diff --git a/Dockerfile b/Dockerfile index 1752c3c3a..1e25f3e4a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,9 @@ # This recipe is pulled from: https://stackoverflow.com/a/33601894 # Parent Dockerfile https://github.com/docker-library/mongo/blob/982328582c74dd2f0a9c8c77b84006f291f974c3/3.0/Dockerfile -FROM mongo:6.0.1 +ARG MONGODB='6.0.1' + +FROM mongo:${MONGODB} # Modify child mongo to use /data/db2 as dbpath (because /data/db wont persist the build) COPY ./docker/mongodb.conf /etc diff --git a/README.md b/README.md index c11824939..b2324c4a4 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,14 @@ docker build -t 5e-database . docker run -i -t 5e-database:latest ``` +During the `build` step, you can specify the version of MongoDB to use with the following: + +```bash +docker build --build-arg MONGODB=4.4 -t 5e-database . +``` + +*MongoDB v4.4 is the latest version that does not require the AVX instruction set to run.* + ### Without Docker First you need to make sure you have [MongoDB installed locally.](https://docs.mongodb.com/manual/installation/)