From c6225e32bca578cd1f0fa09cc6222eff4f654a2a Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Wed, 3 Jun 2026 23:09:01 +1200 Subject: [PATCH 1/2] Add MongoDB version parameter to Dockerfile --- Dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 From 55dcf2dfc73f01a2a2e053a5bd855d41b7163214 Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Wed, 3 Jun 2026 23:16:57 +1200 Subject: [PATCH 2/2] Update README --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) 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/)