Dockerfile links3.4.5, 3.4, 3, latest (3.4/Dockerfile) 3.4.5-slim, 3.4-slim, 3-slim, slim (3.4-slim/Dockerfile) MongoDB (from "humongous") is a cross-platform document-oriented database. Classified as a NoSQL database, MongoDB eschews the traditional table-based relational database structure in favor of JSON-like documents with dynamic schemas (MongoDB calls the format BSON), making the integration of data in certain types of applications easier and faster. Released under a combination of the GNU Affero General Public License and the Apache License, MongoDB is free and open-source software.

docker run -d -p 27017:27017 -e DB_NAME=mongo khezen/mongo:latest
version: '2'
services:
mongod1:
image: khezen/mongo:3.4
environment:
RS_NAME: rs
STORAGE_ENGINE: rocksdb
volumes:
- /data/mongo/mongod1:/data/db
ports:
- "27017:27017"
network_mode: bridge
restart: always
wiredTigerChoose the storage engine to be used:
nTo enable AUTHentication, set to y.
adminUser with root permissions on the admin DB_NAME. (AUTH has to be set to y).
changemeThe password of the ADMIN_USER above. (AUTH has to be set to y).
(empty by default)Create a new DB_NAME with this name.
userUser with owner permissions on the DB_NAME above. (AUTH has to be set to y, DB_NAME has to be specified).
changemeThe password of the DB_USER above. (AUTH has to be set to y, DB_NAME has to be specified).
/data/dbThe path to data storing floder.
50Define the size of Oplog, in megabytes.
(empty by default)Define the name of the replica set on which you want this server to be attached.
$HOSTNAMEDefine the host:port of the master during replica set init. (RS_NAME has to be specified).
(empty by default)Define the host:port members you want to add to a replica set from its master. (RS_NAME has to be specified, MASTER has to be specified).
See examples
(empty by default)Define the host:port arbitrers you want to add to a replica set from its master. (RS_NAME has to be specified, MASTER has to be specified, SLAVES has to be specified).
See examples
yy means you can read from slaves.
ny means mongod is a shard by adding --shardsvr option.
ny means mongod is launched as a config server by adding --configsvr option.
(empty by default)Start a mongos instance instead of a mongod and define the rsname/host:port config servers attached to it.
(empty by default)Define the rsname/host:port shards you want to add to a cluster.(CONFIG_SERVERS has to be specified).
NOTE: if DB_NAME is specified, then sharding is automatically enabled for the database named after it.
See examples
If you have any problems with or questions about this image, please ask for help through a GitHub issue.
Content type
Image
Digest
Size
87.4 MB
Last updated
almost 9 years ago
docker pull tossp/mongo