Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 6 additions & 15 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
# SPDX-FileCopyrightText: 2026 The analyzer-default Authors

# ── build stage ────────────────────────────────────────────────────────────────
# Use BUILDPLATFORM so cross-compilation happens on the native runner (fast).
# TARGETOS/TARGETARCH are injected by buildx for each platform slice.
FROM --platform=$BUILDPLATFORM golang:1.25-alpine AS build

ARG TARGETOS
Expand All @@ -21,19 +19,12 @@ RUN CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} \
# ── distroless release image ───────────────────────────────────────────────────
FROM gcr.io/distroless/static-debian12:nonroot

ARG VERSION=dev
ARG BUILD_DATE
ARG VCS_REF

LABEL org.opencontainers.image.title="semrel-plugin-analyzer-default" \
org.opencontainers.image.description="semrel plugin: analyzer-default" \
org.opencontainers.image.url="https://semrel.io" \
org.opencontainers.image.source="https://github.com/SemRels/analyzer-default" \
org.opencontainers.image.version="${VERSION}" \
org.opencontainers.image.created="${BUILD_DATE}" \
org.opencontainers.image.revision="${VCS_REF}" \
org.opencontainers.image.licenses="Apache-2.0" \
org.opencontainers.image.vendor="SemRels"
# NOTE: intentionally no repo-specific `org.opencontainers.image.*` LABEL block
# here. sync-template.yml only substitutes the "analyzer-default Authors" line
# in this file when propagating it to plugin repos (see `sed` step) — it does
# NOT rewrite LABEL title/description/source values. Adding those here would
# get copied verbatim (and wrongly) into every plugin's Dockerfile. Add labels
# in each plugin's own Dockerfile after copying this template, not here.

COPY --from=build /out/plugin /usr/local/bin/plugin
USER nonroot
Expand Down
Loading