From b1afc22a12ac427c510a15954f894253699a225c Mon Sep 17 00:00:00 2001
From: Michele Alberti <michele.alberti@cea.fr>
Date: Wed, 6 Jul 2022 16:07:59 +0200
Subject: [PATCH] [docker] Make it possible to provide the OCaml version to the
 Makefile.

---
 docker/Makefile | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/docker/Makefile b/docker/Makefile
index d721e301..ea386713 100644
--- a/docker/Makefile
+++ b/docker/Makefile
@@ -22,6 +22,8 @@
 
 .PHONY: pub push
 
+OCAML_VERSION?=4.13
+
 all: Dockerfile
 	@echo "You may want to consider adding ARGS=--no-cache to force"
 	@echo "Docker to rebuild all layers."
@@ -35,5 +37,5 @@ Dockerfile: Makefile Dockerfile.template env.template
 	sed 's|@UBUNTU_OPAM_BASE@|ocaml/opam:ubuntu-ocaml-@OCAMLV@|g' Dockerfile.template | \
 sed 's|@ENV@|$(shell cat env.template)|g' | \
 sed 's|@OPAM_DEPS@|conf-protoc conf-gmp conf-autoconf conf-pkg-config|' | \
-sed 's|@OCAMLV@|4.13|g' | \
+sed 's|@OCAMLV@|'$(OCAML_VERSION)'|g' | \
 cat > $@
-- 
GitLab