Sign inSign up

alexandregilberga/mongodb

By alexandregilberga

•Updated about 10 years ago

MongoDB 2.4.9

Image
0

75

alexandregilberga/mongodb repository overview

⁠MongoDB 2.4.9

⁠How to use this image

$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.

⁠How to store logs
docker run -d -v $logs_dir:/var/log/mongodb alexandregilberga/mongodb
⁠How to store data
docker run -d -v $data_dir:/var/lib/mongodb alexandregilberga/mongodb
⁠Start a MongoDB server instance
docker run -d --name $container_name -v $data_dir:/var/lib/mongodb -v $logs_dir:/var/log/mongodb alexandregilberga/mongodb
⁠Set Permissions on MongoDB server
docker exec -ti $container_name mongo admin
⁠Connect to MongoDB from another application in another Docker container
docker run -d --link $container_name $yourapplicationimage 
⁠Using a custom MongoDB configuration file
docker run -d -v $config_file:/etc/mongodb.conf alexandregilberga/mongodb
⁠Contact [email protected]⁠ for more information.

Tag summary

Content type

Image

Digest

Size

148.2 MB

Last updated

about 10 years ago

docker pull alexandregilberga/mongodb:2.4.9