Skip to content
Snippets Groups Projects
Commit dc623e37 authored by Michele Alberti's avatar Michele Alberti
Browse files

[docker] Fix Makefile to use default base image when 'docker manifest inspect' fails.

Avoid having the default image hardcoded in template.
parent 4eada030
No related branches found
No related tags found
No related merge requests found
......@@ -21,9 +21,9 @@
##########################################################################
# Dockerfile for easy install and use of CAISAR.
FROM ocaml/opam@sha256:9d471148a7acdaba15caa139710f89ca8668a191c0052eb1c80cb9729e337c40
#FROM ocaml/opam@sha256:9d471148a7acdaba15caa139710f89ca8668a191c0052eb1c80cb9729e337c40
#FROM @UBUNTU_OPAM_BASE@
FROM @UBUNTU_OPAM_BASE@
RUN opam-2.1 repository set-url default https://opam.ocaml.org && \
opam-2.1 update -y
......
......@@ -34,11 +34,12 @@ push: all
docker push laiser/caisar:pub
SHA_DOCKER=$(shell docker manifest inspect ocaml/opam:ubuntu-ocaml-$(OCAML_VERSION) | jq '.manifests| .[] | select(.platform.architecture == "amd64") | .digest' --raw-output)
SHA_DOCKER:=$(or $(SHA_DOCKER),sha256:9d471148a7acdaba15caa139710f89ca8668a191c0052eb1c80cb9729e337c40)
CAISAR_COMMIT?=$(shell git rev-parse HEAD)
Dockerfile: Makefile Dockerfile.template env.template FORCE
cat Dockerfile.template | \
sed 's|@UBUNTU_OPAM_BASE@|ocaml/opam@$(SHA_DOCKER)|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@|'$(OCAML_VERSION)'|g' | \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment