Skip to content

aymen94/mongodb-alpine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

docker_pull_badge idocker_size_badge

MongoDB Alpine

Alpine Linux with MongoDB.

Information

  • apline 3.9
  • MongoDB v4.0.5

Install

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 .

Run

$ docker run -d --name mongodb -p 27017:27017 aymen94/mongodb-alpine

Run with data mounted to the native host

$ docker run -v ~/my_mongo_data:/data/db -it -p 27017:27017 aymen94/mongodb-alpine

Run a shell session

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

Configuration

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