Skip to content

Commit 14c378d

Browse files
committed
add labels
1 parent 6738235 commit 14c378d

5 files changed

Lines changed: 16 additions & 2 deletions

File tree

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ build-image: guard-CONTAINER_NAME guard-BASE_VERSION guard-BASE_FOLDER
2525
npx devcontainer build \
2626
--workspace-folder ./src/$${BASE_FOLDER}/$${CONTAINER_NAME} \
2727
--push false \
28-
--image-name "${CONTAINER_PREFIX}$${CONTAINER_NAME}${IMAGE_TAG}"
28+
--label "org.opencontainers.image.revision=$$DOCKER_TAG" \
29+
--image-name "${CONTAINER_PREFIX}$${CONTAINER_NAME}${IMAGE_TAG}"
2930

3031
scan-image: guard-CONTAINER_NAME guard-BASE_FOLDER
3132
@combined="src/$${BASE_FOLDER}/$${CONTAINER_NAME}/.trivyignore_combined.yaml"; \

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@ The base image is built first, and then language images, and finally project ima
7070

7171
Docker images are scanned for vulnerabilities using trivy as part of a build step, and the build fails if vulnerabilities are found not in .trivyignore file.
7272

73-
Docker images are also uploaded as artifacts of build.
73+
For pull requests, images are tagged with the pr-<pull request id>-<short commit sha>.
74+
For merges to main, images are tagged with the <short commit sha>
7475

7576
# Release workflow
7677
There is a release workflow that runs weekly at 18:00 on Thursday and on demand.

src/base/.devcontainer/Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ ARG CONTAINER_NAME
77
ENV CONTAINER_NAME=${CONTAINER_NAME}
88
ENV SCRIPTS_DIR=${SCRIPTS_DIR}
99

10+
LABEL org.opencontainers.image.source=https://github.com/NHSDigital/eps-devcontainers
11+
LABEL org.opencontainers.image.description="EPS base devcontainer"
12+
LABEL org.opencontainers.image.licenses=MIT
13+
1014
ARG ASDF_VERSION
1115
COPY .tool-versions.asdf ${SCRIPTS_DIR}/${CONTAINER_NAME}/.tool-versions.asdf
1216

src/common/Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ FROM ghcr.io/nhsdigital/eps-devcontainers/base:${BASE_VERSION}
55
ARG CONTAINER_NAME
66
ENV CONTAINER_NAME=${CONTAINER_NAME}
77

8+
LABEL org.opencontainers.image.source=https://github.com/NHSDigital/eps-devcontainers
9+
LABEL org.opencontainers.image.description="EPS ${CONTAINER_NAME} devcontainer"
10+
LABEL org.opencontainers.image.licenses=MIT
11+
812
USER root
913
COPY --chmod=755 scripts ${SCRIPTS_DIR}/${CONTAINER_NAME}
1014
WORKDIR ${SCRIPTS_DIR}/${CONTAINER_NAME}

src/projects/fhir_facade_api/.devcontainer/Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ ARG BASE_VERSION=latest
22

33
FROM ghcr.io/nhsdigital/eps-devcontainers/node_24_python_3_13:${BASE_VERSION}
44

5+
LABEL org.opencontainers.image.source=https://github.com/NHSDigital/eps-devcontainers
6+
LABEL org.opencontainers.image.description="EPS fhir facade devcontainer"
7+
LABEL org.opencontainers.image.licenses=MIT
8+
59
USER root
610
COPY --chmod=755 scripts ${SCRIPTS_DIR}/${CONTAINER_NAME}
711
WORKDIR ${SCRIPTS_DIR}/${CONTAINER_NAME}

0 commit comments

Comments
 (0)