-
Creates a collection for each directory in
collections/
- collection name is same as directory name
-
Imports data into the collection if the directory has a
data.json
file
./collections
- collection - collection name
- data.json
FROM chadgrant/mongo:3.4
COPY collections /docker-entrypoint-initdb.d/collections
docker run -itp 27017-27018:27017-27018 \
-v $(pwd)/collections:/docker-entrypoint-initdb.d/collections \
chadgrant/mongo:${BUILD_NUMBER}
make docker-build
make docker-run