Skip to content

Commit 9adfb9f

Browse files
committed
build: add OCI image labels to Dockerfile
1 parent c931c2b commit 9adfb9f

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

.github/workflows/docker.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,7 @@ jobs:
4848
ghcr.io/crosstalk-solutions/project-nomad:${{ inputs.version }}
4949
ghcr.io/crosstalk-solutions/project-nomad:v${{ inputs.version }}
5050
${{ inputs.tag_latest && 'ghcr.io/crosstalk-solutions/project-nomad:latest' || '' }}
51+
build-args: |
52+
VERSION=${{ inputs.version }}
53+
BUILD_DATE=${{ github.event.workflow_run.created_at }}
54+
VCS_REF=${{ github.sha }}

Dockerfile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,21 @@ RUN node ace build
2424

2525
# Production stage
2626
FROM base
27+
ARG VERSION=dev
28+
ARG BUILD_DATE
29+
ARG VCS_REF
30+
31+
# Labels
32+
LABEL org.opencontainers.image.title="Project N.O.M.A.D" \
33+
org.opencontainers.image.description="The Project N.O.M.A.D Official Docker image" \
34+
org.opencontainers.image.version="${VERSION}" \
35+
org.opencontainers.image.created="${BUILD_DATE}" \
36+
org.opencontainers.image.revision="${VCS_REF}" \
37+
org.opencontainers.image.vendor="Crosstalk Solutions, LLC" \
38+
org.opencontainers.image.documentation="https://github.com/CrosstalkSolutions/project-nomad/blob/main/README.md" \
39+
org.opencontainers.image.source="https://github.com/CrosstalkSolutions/project-nomad" \
40+
org.opencontainers.image.licenses="Apache-2.0"
41+
2742
ENV NODE_ENV=production
2843
WORKDIR /app
2944
COPY --from=production-deps /app/node_modules /app/node_modules

0 commit comments

Comments
 (0)