-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
23 lines (19 loc) · 742 Bytes
/
Dockerfile
File metadata and controls
23 lines (19 loc) · 742 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
FROM golang:1.24-alpine AS build
ARG VERSION=dev
WORKDIR /src
COPY go.mod ./
RUN go mod download
COPY *.go ./
RUN CGO_ENABLED=0 go build -ldflags="-s -w -X main.version=${VERSION}" -o /pkgbadge .
FROM gcr.io/distroless/static-debian12
ARG VERSION=dev
ARG BUILD_DATE=unknown
LABEL org.opencontainers.image.source="https://github.com/Will-Luck/pkgbadge" \
org.opencontainers.image.version="${VERSION}" \
org.opencontainers.image.created="${BUILD_DATE}" \
org.opencontainers.image.licenses="MIT" \
org.opencontainers.image.title="pkgbadge" \
org.opencontainers.image.description="Self-hosted badge endpoint for GHCR container packages"
COPY --from=build /pkgbadge /pkgbadge
EXPOSE 8080
ENTRYPOINT ["/pkgbadge"]