Skip to content
Snippets Groups Projects
Commit 5a54967d authored by Wouter Deconinck's avatar Wouter Deconinck
Browse files

feat: populate OCI labels

parent e6fd0a94
Branches
Tags
1 merge request!1128feat: populate OCI labels
......@@ -4,12 +4,17 @@ ARG BASE_IMAGE="amd64/debian:stable-slim"
ARG BUILD_IMAGE="debian_stable_base"
# Minimal container based on Debian base systems for up-to-date packages.
FROM ${BASE_IMAGE}
FROM ${BASE_IMAGE}
ARG TARGETPLATFORM
LABEL maintainer="Sylvester Joosten <sjoosten@anl.gov>" \
name="${BUILD_IMAGE}" \
march="amd64"
# Open Container Initiative labels
LABEL org.opencontainers.image.title="Electron-Ion Collider base image ($TARGETPLATFORM)"
LABEL org.opencontainers.image.vendor="Electron-Ion Collider"
LABEL org.opencontainers.image.authors="Electron-Ion Collider Software Working Groups <eic-software-l-owner@lists.bnl.gov>"
LABEL org.opencontainers.image.url="https://github.com/eic/containers"
LABEL org.opencontainers.image.source="https://github.com/eic/containers"
LABEL org.opencontainers.image.documentation="https://eic.github.io"
LABEL org.opencontainers.image.license="GPL-3.0-or-later"
COPY bashrc /root/.bashrc
......
......@@ -37,6 +37,15 @@ ARG INTERNAL_TAG="master"
FROM ${DOCKER_REGISTRY}${BUILDER_IMAGE}:${INTERNAL_TAG} as builder_concretization_default
ARG TARGETPLATFORM
# Open Container Initiative labels
LABEL org.opencontainers.image.title="Electron-Ion Collider build concretization image (default configuration, $TARGETPLATFORM)"
LABEL org.opencontainers.image.vendor="Electron-Ion Collider"
LABEL org.opencontainers.image.authors="Electron-Ion Collider Software Working Groups <eic-software-l-owner@lists.bnl.gov>"
LABEL org.opencontainers.image.url="https://github.com/eic/containers"
LABEL org.opencontainers.image.source="https://github.com/eic/containers"
LABEL org.opencontainers.image.documentation="https://eic.github.io"
LABEL org.opencontainers.image.license="GPL-3.0-or-later"
## Copy our default environment
COPY --from=spack-environment . /opt/spack-environment/
ARG ENV=xl
......@@ -59,6 +68,15 @@ EOF
FROM builder_concretization_default as builder_installation_default
ARG TARGETPLATFORM
# Open Container Initiative labels
LABEL org.opencontainers.image.title="Electron-Ion Collider build installation image (default configuration, $TARGETPLATFORM)"
LABEL org.opencontainers.image.vendor="Electron-Ion Collider"
LABEL org.opencontainers.image.authors="Electron-Ion Collider Software Working Groups <eic-software-l-owner@lists.bnl.gov>"
LABEL org.opencontainers.image.url="https://github.com/eic/containers"
LABEL org.opencontainers.image.source="https://github.com/eic/containers"
LABEL org.opencontainers.image.documentation="https://eic.github.io"
LABEL org.opencontainers.image.license="GPL-3.0-or-later"
# Installation (default environment)
RUN --mount=type=cache,target=/ccache,id=${TARGETPLATFORM} \
--mount=type=cache,target=/var/cache/spack \
......@@ -86,6 +104,15 @@ EOF
FROM ${DOCKER_REGISTRY}${RUNTIME_IMAGE}:${INTERNAL_TAG} as runtime_concretization_default
ARG TARGETPLATFORM
# Open Container Initiative labels
LABEL org.opencontainers.image.title="Electron-Ion Collider runtime concretization image (default configuration, $TARGETPLATFORM)"
LABEL org.opencontainers.image.vendor="Electron-Ion Collider"
LABEL org.opencontainers.image.authors="Electron-Ion Collider Software Working Groups <eic-software-l-owner@lists.bnl.gov>"
LABEL org.opencontainers.image.url="https://github.com/eic/containers"
LABEL org.opencontainers.image.source="https://github.com/eic/containers"
LABEL org.opencontainers.image.documentation="https://eic.github.io"
LABEL org.opencontainers.image.license="GPL-3.0-or-later"
## Copy our default environment
COPY --from=spack-environment . /opt/spack-environment/
ARG ENV=xl
......@@ -105,6 +132,15 @@ COPY --from=builder_installation_default \
FROM runtime_concretization_default as runtime_installation_default
ARG TARGETPLATFORM
# Open Container Initiative labels
LABEL org.opencontainers.image.title="Electron-Ion Collider runtime installation image (default configuration, $TARGETPLATFORM)"
LABEL org.opencontainers.image.vendor="Electron-Ion Collider"
LABEL org.opencontainers.image.authors="Electron-Ion Collider Software Working Groups <eic-software-l-owner@lists.bnl.gov>"
LABEL org.opencontainers.image.url="https://github.com/eic/containers"
LABEL org.opencontainers.image.source="https://github.com/eic/containers"
LABEL org.opencontainers.image.documentation="https://eic.github.io"
LABEL org.opencontainers.image.license="GPL-3.0-or-later"
# Installation (default environment, from buildcache)
RUN --mount=type=cache,target=/var/cache/spack \
--mount=type=secret,id=mirrors,target=/opt/spack/etc/spack/mirrors.yaml \
......@@ -139,6 +175,15 @@ EOF
FROM builder_installation_default as builder_concretization_custom
ARG TARGETPLATFORM
# Open Container Initiative labels
LABEL org.opencontainers.image.title="Electron-Ion Collider build concretization image (custom configuration, $TARGETPLATFORM)"
LABEL org.opencontainers.image.vendor="Electron-Ion Collider"
LABEL org.opencontainers.image.authors="Electron-Ion Collider Software Working Groups <eic-software-l-owner@lists.bnl.gov>"
LABEL org.opencontainers.image.url="https://github.com/eic/containers"
LABEL org.opencontainers.image.source="https://github.com/eic/containers"
LABEL org.opencontainers.image.documentation="https://eic.github.io"
LABEL org.opencontainers.image.license="GPL-3.0-or-later"
## 2. Setup our environment with custom versions (on top of cached layer)
## Note: these default versions are just the very first commit.
ARG EDM4EIC_VERSION="8aeb507f93a93257c99985efbce0ec1371e0b331"
......@@ -185,6 +230,15 @@ EOF
FROM builder_concretization_custom as builder_installation_custom
ARG TARGETPLATFORM
# Open Container Initiative labels
LABEL org.opencontainers.image.title="Electron-Ion Collider build installation image (custom configuration, $TARGETPLATFORM)"
LABEL org.opencontainers.image.vendor="Electron-Ion Collider"
LABEL org.opencontainers.image.authors="Electron-Ion Collider Software Working Groups <eic-software-l-owner@lists.bnl.gov>"
LABEL org.opencontainers.image.url="https://github.com/eic/containers"
LABEL org.opencontainers.image.source="https://github.com/eic/containers"
LABEL org.opencontainers.image.documentation="https://eic.github.io"
LABEL org.opencontainers.image.license="GPL-3.0-or-later"
# Installation (custom environment)
RUN --mount=type=cache,target=/ccache,id=${TARGETPLATFORM} \
--mount=type=cache,target=/var/cache/spack \
......@@ -218,6 +272,17 @@ EOF
## - runtime base with concretization of custom versions (taken from equivalent builder)
## ========================================================================================
FROM runtime_installation_default as runtime_concretization_custom
ARG TARGETPLATFORM
# Open Container Initiative labels
LABEL org.opencontainers.image.title="Electron-Ion Collider runtime concretization image (custom configuration, $TARGETPLATFORM)"
LABEL org.opencontainers.image.vendor="Electron-Ion Collider"
LABEL org.opencontainers.image.authors="Electron-Ion Collider Software Working Groups <eic-software-l-owner@lists.bnl.gov>"
LABEL org.opencontainers.image.url="https://github.com/eic/containers"
LABEL org.opencontainers.image.source="https://github.com/eic/containers"
LABEL org.opencontainers.image.documentation="https://eic.github.io"
LABEL org.opencontainers.image.license="GPL-3.0-or-later"
COPY --from=builder_installation_custom \
/opt/spack-environment/${ENV}/spack.* \
/opt/spack-environment/${ENV}/
......@@ -233,6 +298,15 @@ COPY --from=builder_installation_custom \
FROM runtime_concretization_custom as runtime_installation_custom
ARG TARGETPLATFORM
# Open Container Initiative labels
LABEL org.opencontainers.image.title="Electron-Ion Collider runtime installation image (custom configuration, $TARGETPLATFORM)"
LABEL org.opencontainers.image.vendor="Electron-Ion Collider"
LABEL org.opencontainers.image.authors="Electron-Ion Collider Software Working Groups <eic-software-l-owner@lists.bnl.gov>"
LABEL org.opencontainers.image.url="https://github.com/eic/containers"
LABEL org.opencontainers.image.source="https://github.com/eic/containers"
LABEL org.opencontainers.image.documentation="https://eic.github.io"
LABEL org.opencontainers.image.license="GPL-3.0-or-later"
# Installation (default environment, from buildcache)
RUN --mount=type=cache,target=/var/cache/spack \
--mount=type=secret,id=mirrors,target=/opt/spack/etc/spack/mirrors.yaml \
......@@ -259,6 +333,15 @@ EOF
FROM runtime_installation_custom
ARG TARGETPLATFORM
# Open Container Initiative labels
LABEL org.opencontainers.image.title="Electron-Ion Collider runtime installation image (custom configuration, $TARGETPLATFORM)"
LABEL org.opencontainers.image.vendor="Electron-Ion Collider"
LABEL org.opencontainers.image.authors="Electron-Ion Collider Software Working Groups <eic-software-l-owner@lists.bnl.gov>"
LABEL org.opencontainers.image.url="https://github.com/eic/containers"
LABEL org.opencontainers.image.source="https://github.com/eic/containers"
LABEL org.opencontainers.image.documentation="https://eic.github.io"
LABEL org.opencontainers.image.license="GPL-3.0-or-later"
## Create views at /opt/local and /opt/detector
RUN <<EOF
set -e
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment