Skip to content

Latest commit

 

History

History
executable file
·
39 lines (29 loc) · 785 Bytes

README.md

File metadata and controls

executable file
·
39 lines (29 loc) · 785 Bytes

Mongo

  • 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

Github Repository

Sample

    ./collections
        - collection - collection name
           - data.json
FROM chadgrant/mongo:3.4

COPY collections /docker-entrypoint-initdb.d/collections

Running locally without Dockerfile

	docker run -itp 27017-27018:27017-27018 \
            -v $(pwd)/collections:/docker-entrypoint-initdb.d/collections \
			chadgrant/mongo:${BUILD_NUMBER}

Building

make docker-build

Running

make docker-run