Alpine Linux with MongoDB.
- apline 3.9
- MongoDB v4.0.5
Download image from the public docker hub:
$ docker pull aymen94/mongodb-alpine
To re-build this image from the dockerfile:
$ docker build -t aymen94/mongodb-alpine .
$ docker run -d --name mongodb -p 27017:27017 aymen94/mongodb-alpine
$ docker run -v ~/my_mongo_data:/data/db -it -p 27017:27017 aymen94/mongodb-alpine
To use the mongo shell client:
$ docker exec -ti mongodb sh
The mongo shell client can also be run its own container:
$ docker exec -ti mongodb mongo
To change internals default configurations
MONGODB_STORAGE_ENGINE="wiredTiger"
MONGODB_JOURNALING="nojournal"
MONGODB_PORT="27017"
MONGODB_HOST="0.0.0.0"
MONGODB_MOUNTPOINT="/data/db"
$ docker run -e MONGODB_STORAGE_ENGINE="NEW ENGINE" -ti mongodb