I\'m running a dockerized mongo container.
I\'d like to create a mongo image with some initialized data.
Any ideas?
with the latest release of mongo docker , something like this works for me.
FROM mongo
COPY dump /home/dump
COPY mongo_restore.sh /docker-entrypoint-initdb.d/
the mongo restore script looks like this.
#!/bin/bash
# Restore from dump
mongorestore --drop --gzip --db "" /home/dump
and you could build the image normally.
docker build -t .