Files for building MongoDB docker container.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
702 B

#!/bin/bash
#
# Run the docker container
#
# Input traffic only, via specified port.
# Mount volume being synced, too: /opt/mongodb
#
# Can bind the interface to an IP at the docker layer:
#
# -p <bind-ip>:27017:27017
#
# http://charlesreid1.com/wiki/Docker/Basics
HOSTIP="10.6.0.2"
debug=false
#debug=true
docker ps -qa | xargs docker rm
if [ "$debug" == true ]; then
docker run \
--name happy_mongo \
-p ${HOSTIP}:27017:27017 \
-v /opt/mongodb:/data \
-ti jupitermongo \
/bin/bash
else
docker run \
--name happy_mongo \
-p ${HOSTIP}:27017:27017 \
-v /opt/mongodb:/data \
-d \
-ti jupitermongo
fi