Sign inSign up

syis/mongo

By syis

•Updated almost 6 years ago

MongoDB with multiple databases

Image
1

281

syis/mongo repository overview

⁠MongoDB

Official Docker MongoDB Image of Synaps.is⁠

⁠Docker Image content

⁠Dockerfile Example

FROM syis/mongo:4.4.2-bionic

# An initialization script creates the needed
# databases by reading the environments named:
# - MONGO_DB_x_NAME
# - MONGO_DB_x_USER
# - MONGO_DB_x_PASSWORD
# (where x is an incremental integer)
# The script cycle over the numbers (by starting from 1),
# until it NOT find a variable named MONGO_DB_i_NAME

ENV MONGO_DB_1_NAME='db_name'
ENV MONGO_DB_1_USER='db_user'
ENV MONGO_DB_1_PASSWORD='db_password'

ENV MONGO_DB_2_NAME='db_2_name'
ENV MONGO_DB_2_USER='db_2_user'
ENV MONGO_DB_2_PASSWORD='db_2_password'

EXPOSE 27017

⁠Tags

Tag summary

Content type

Image

Digest

Size

169.9 MB

Last updated

almost 6 years ago

docker pull syis/mongo