$data_dir will be the folder that stores all mongodb data on your server. $logs_dir will be the folder that stores all mongodb logs on your server. $container_name will be the name that you can set up for this container. $yourapplicationimage will be the name of the application that have to connect to MongoDB. $yourpassword will be the MongoDB root user's password.
docker run -d -v $logs_dir:/var/log/mongodb alexandregilberga/mongodb
docker run -d -v $data_dir:/var/lib/mongodb alexandregilberga/mongodb
docker run -d --name $container_name -v $data_dir:/var/lib/mongodb -v $logs_dir:/var/log/mongodb alexandregilberga/mongodb
docker exec -ti $container_name mongo admin
docker run -d --link $container_name $yourapplicationimage
docker run -d -v $config_file:/etc/mongodb.conf alexandregilberga/mongodb
Content type
Image
Digest
Size
148.2 MB
Last updated
about 10 years ago
docker pull alexandregilberga/mongodb:2.4.9