Skip to content

Commit

Permalink
base: add labels to the resulting image containing the build properties.
Browse files Browse the repository at this point in the history
  • Loading branch information
gustavosr8 committed Jan 6, 2025
1 parent 499e415 commit 6cc9faa
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,17 @@ FROM ghcr.io/cnpem/lnls-debian-epics-7:v0.12.0-dev AS build-image

FROM debian:${DEBIAN_VERSION}-slim AS base

ARG DEBIAN_VERSION

ARG RUNDIR
ARG ENTRYPOINT=/usr/local/bin/lnls-run
ARG RUNTIME_PACKAGES
ARG RUNTIME_TAR_PACKAGES
ARG RUNTIME_PIP_PACKAGES

LABEL br.lnls.epics-in-docker.version="v0.12.0-dev"
LABEL br.lnls.debian.version=${DEBIAN_VERSION}

COPY --from=build-image /etc/apt/apt.conf.d/90-disable-sandbox.conf /etc/apt/apt.conf.d/90-disable-sandbox.conf

RUN apt update -y && \
Expand Down Expand Up @@ -44,8 +49,9 @@ ENTRYPOINT ["./entrypoint"]

FROM base AS no-build

COPY --from=build-image /opt /opt
LABEL br.lnls.epics-in-docker.target="no-build"

COPY --from=build-image /opt /opt

FROM build-image AS build-stage

Expand Down Expand Up @@ -78,8 +84,9 @@ RUN make distclean && make -j ${JOBS} && make $([ "$SKIP_TESTS" != 1 ] && echo r

FROM base AS dynamic-link

COPY --from=dynamic-build /opt /opt
LABEL br.lnls.epics-in-docker.target="dynamic-link"

COPY --from=dynamic-build /opt /opt

FROM build-stage AS static-build

Expand All @@ -94,6 +101,8 @@ RUN make distclean && make -j ${JOBS} && make $([ "$SKIP_TESTS" != 1 ] && echo r

FROM base AS static-link

LABEL br.lnls.epics-in-docker.target="static-link"

ARG REPONAME

COPY --from=static-build /opt/${REPONAME} /opt/${REPONAME}

0 comments on commit 6cc9faa

Please sign in to comment.