Sign inSign up

sdsws/alpine-mongo

By sdsws

•Updated over 6 years ago

Image
0

981

sdsws/alpine-mongo repository overview

⁠docker-alpine-mongo

An alpine:3.11.6 image with mongodb. The default behavior is to run mongo in '--auth' mode. This image will set a root username and password based on environment variables at run time. It can be edited as well from the Dockerfile.

⁠Environment Variables

  • MONGO_INITDB_ROOT_USERNAME:
    The root username for the mongod instance.
  • MONGO_INITDB_ROOT_PASSWORD:
    The root password for the mongod instance.

⁠Examples

docker run -d --name mongo \
    -e MONGO_INITDB_ROOT_USERNAME = "root-user" \ 
    -e MONGO_INITDB_ROOT_PASSWORD = "pass123" \
    -p "27019:27017" \ 
    -v /path/to/data:/data/db \
    sdsws/alpine-mongo:latest

Passing other options to 'mongod' at startup.

docker run -d --name mongo \
  -p "27019:27017" \
  -v /path/to/data:/data/db \
  sdsws/alpine-mongo:latest mongod --smallfiles

Tag summary

Content type

Image

Digest

Size

67.2 MB

Last updated

over 6 years ago

docker pull sdsws/alpine-mongo