Sign inSign up

tiberiuc/mongodb

By tiberiuc

Updated over 7 years ago

MongoDB running inside docker with backup and restore support for db

Image
0

426

tiberiuc/mongodb repository overview

docker-mongodb

A Docker container for running mongodb with support for backups, based on Alpine Linux.

Full support for backup-agent

Quick start

Requires that Docker be installed on the host machine.

# Create some directory where your database data will be stored.
$ mkdir /home/youruser/mongo_data

$ docker run --name mongodb -d \
   --volume /home/youruser/mongo_data:/data/db \
   --publish 27017:27017 \
   --publish 9191:9191 \
   tiberiuc/mongodb

$ docker logs -f mongodb
[ ... ]

Daemonizing

Currently mongodb is run inside supervisor

Backup and restore

Backup

curl http://localhost:9191/backup -o mongodb.tgz

Restore

curl http://localhost:9191/restore --data-binary @./mongodb.tgz

Tag summary

Content type

Image

Digest

Size

101 MB

Last updated

over 7 years ago

docker pull tiberiuc/mongodb