Minimal Node/io.js Docker Images built on Alpine Linux with MongoDB
1.8K
This is fork of mvertes/alpine-mongo which based on mhart/alpine-node.
This repository contains Dockerfile for MongoDB 3.2 container, based on the Alpine 3.3 image.
Why ? the official mongo image size: 317 MB, alpine-mongo: 133 MB
As a prerequisite, you need Docker to be installed.
To download this image from the public docker hub:
$ docker pull mvertes/alpine-mongo
To re-build this image from the dockerfile:
$ docker build -t mvertes/alpine-mongo .
To run mongod:
$ docker run -d --name mongo -p 27017:27017 mvertes/alpine-mongo
You can also specify the database repository where to store the data with the volume -v option:
$ docker run -d --name mongo -p 27017:27017 \
-v /somewhere/onmyhost/mydatabase:/data/db \
mvertes/alpine-mongo
Now, on the same host where the mongodb container is running, to trace database network activity in real-time:
$ docker exec -ti mongo mongosniff
To run a shell session:
$ docker exec -ti mongo sh
To use the mongo shell client:
$ docker exec -ti mongo mongo
The mongo shell client can also be run its own container:
$ docker run -ti --rm --name mongoshell monogo host:port/db
Content type
Image
Digest
Size
124.2 MB
Last updated
over 10 years ago
docker pull pitzcarraldo/alpine-node-mongo