Skip to content
Snippets Groups Projects
Commit 43f08266 authored by Ujwal Kundur's avatar Ujwal Kundur
Browse files

Introduce BASEIMAGE ARG to avoid redundant dockerfiles

Both oneapi_jug_xl and jug_xl are built from the same
containers/jug/xl.Dockerfile with the base image changed using
build args
parent d15c4e13
No related branches found
No related tags found
No related merge requests found
......@@ -272,7 +272,7 @@ oneapi_jug_xl:default:
script:
- cp containers/jug/setup_detectors.py containers/oneapi
- cp detectors.yaml containers/oneapi
- docker build -t ${CI_REGISTRY_IMAGE}/${BUILD_IMAGE}:${INTERNAL_TAG}
- docker build -t ${CI_REGISTRY_IMAGE}/${BUILD_IMAGE}:${INTERNAL_TAG}
-f containers/jug/xl.Dockerfile
--build-arg INTERNAL_TAG=${INTERNAL_TAG}
--build-arg BASEIMAGE="oneapi_jug_dev"
......@@ -300,10 +300,11 @@ oneapi_jug_xl:nightly:
BUILD_IMAGE: "oneapi_jug_xl"
script:
- cp containers/jug/setup_detectors.py containers/oneapi
- cp detectors.yaml containers/oneapi
- sed 's/^FROM.*$/FROM ${DOCKER_REGISTRY}oneapi_jug_dev:${INTERNAL_TAG}/' containers/jug/xl.Dockerfile |
docker build \- -t ${CI_REGISTRY_IMAGE}/${BUILD_IMAGE}:${NIGHTLY_TAG}
- cp detectors.yaml containers/oneapi
- docker build -t ${CI_REGISTRY_IMAGE}/${BUILD_IMAGE}:${NIGHTLY_TAG}
-f containers/jug/xl.Dockerfile
--build-arg INTERNAL_TAG=${INTERNAL_TAG}
--build-arg BASEIMAGE="oneapi_jug_dev"
--build-arg JUG_VERSION=nightly-$(date +%Y-%m-%d_%H-%M-%S)-${INTERNAL_TAG}-$(git rev-parse HEAD)
--build-arg NIGHTLY=1
containers/oneapi
......
#syntax=docker/dockerfile:1.2
ARG DOCKER_REGISTRY="eicweb.phy.anl.gov:4567/containers/eic_container/"
ARG INTERNAL_TAG="testing"
ARG INTERNAL_TAG="testing"
ARG BASEIMAGE="jug_dev"
## ========================================================================================
## STAGE1: spack builder image
## EIC builder image with spack
## ========================================================================================
FROM ${DOCKER_REGISTRY}jug_dev:${INTERNAL_TAG}
FROM ${DOCKER_REGISTRY}${BASEIMAGE}:${INTERNAL_TAG}
ARG EICWEB="https://eicweb.phy.anl.gov/api/v4/projects"
ARG JUGGLER_VERSION="master"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment