Sign inSign up

bigtruedata/mongo

By bigtruedata

Updated over 8 years ago

Image for MongoDB

Image
0

4.3K

bigtruedata/mongo repository overview

The MongoDB image

The mongo image contains an instance of a MongoDB database.

Building the image

The image can be build from the project root directory executing:

docker build --tag=btd/mongo .

Running a container

To run the container taking as reference the image created, you can execute the following command:

docker run --interactive --tty \
           --volume "<local-dir>:/data/db" \
           --publish "<local-port>:27017"
           btd/mongo

This image requires the user to provide:

  • A local-port where the user can connect to the MongoDB database,
  • and a local-dir where the data will be stored by the database.

To create and run a container from the btd/mongo image in detached mode, you can run the previous command substituting the --interative and --tty options the following way:

docker run --detach \
           --volume "<local-dir>:/data/db" \
           --publish "<local-port>:27017"
           btd/mongo

Tag summary

Content type

Image

Digest

Size

124.6 MB

Last updated

over 8 years ago

docker pull bigtruedata/mongo