Skip to content

Project NOMAD is an offline-first knowledge and education server. Wikipedia, thousands of books, courses, maps, and optional local AI, all running on hardware you own with no internet required.

TypeScript

build: add OCI image labels to Dockerfile

Jake Turnere7ab2b197c81
diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml
index eb52a986..1cebccfc 100644
--- a/.github/workflows/docker.yml
+++ b/.github/workflows/docker.yml
@@ -48,3 +48,7 @@ jobs:
ghcr.io/crosstalk-solutions/project-nomad:${{ inputs.version }}
ghcr.io/crosstalk-solutions/project-nomad:v${{ inputs.version }}
${{ inputs.tag_latest && 'ghcr.io/crosstalk-solutions/project-nomad:latest' || '' }}
+ build-args: |
+ VERSION=${{ inputs.version }}
+ BUILD_DATE=${{ github.event.workflow_run.created_at }}
+ VCS_REF=${{ github.sha }}
diff --git a/Dockerfile b/Dockerfile
index 739d9e4f..27f3aed6 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -24,6 +24,21 @@ RUN node ace build
# Production stage
FROM base
+ARG VERSION=dev
+ARG BUILD_DATE
+ARG VCS_REF
+
+# Labels
+LABEL org.opencontainers.image.title="Project N.O.M.A.D" \
+ org.opencontainers.image.description="The Project N.O.M.A.D Official Docker image" \
+ org.opencontainers.image.version="${VERSION}" \
+ org.opencontainers.image.created="${BUILD_DATE}" \
+ org.opencontainers.image.revision="${VCS_REF}" \
+ org.opencontainers.image.vendor="Crosstalk Solutions, LLC" \
+ org.opencontainers.image.documentation="https://github.com/CrosstalkSolutions/project-nomad/blob/main/README.md" \
+ org.opencontainers.image.source="https://github.com/CrosstalkSolutions/project-nomad" \
+ org.opencontainers.image.licenses="Apache-2.0"
+
ENV NODE_ENV=production
WORKDIR /app
COPY --from=production-deps /app/node_modules /app/node_modules