Repository navigation
Expand file tree
/
Copy pathDockerfile
More file actions
34 lines (28 loc) · 1.65 KB
/
Copy pathDockerfile
File metadata and controls
34 lines (28 loc) · 1.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
## Build final releasepost docker image
# We on purpose release artifacts created by goreleaser
# located in the dist directory
## The binary is statically linked (CGO_ENABLED=0 in .goreleaser.yml), so the image only
# needs CA certificates, which distroless provides, and no shell or package manager.
# The base is not pinned to the build platform: nothing runs at build time, and
# pinning it gave the arm64 image an amd64 base.
FROM gcr.io/distroless/static-debian13:latest@sha256:4c2cd1dee442c9a99924a378c7c126fac8fef14771579ef567c3f2bdd7a5122a
LABEL maintainer="Olivier Vernin <me@olblak.com>"
# Dynamic labels are defined from the goreleaser configuration ".goreleaser.yml"
LABEL org.opencontainers.image.authors="Olivier Vernin<me@olblak.com>"
LABEL org.opencontainers.image.url="https://github.com/updatecli/releasepost"
LABEL org.opencontainers.image.documentation="https://github.com/updatecli/releasepost"
LABEL org.opencontainers.image.licenses="Apache-2.0"
LABEL org.opencontainers.image.title="Releasepost"
LABEL org.opencontainers.image.description="Re-post release notes"
LABEL org.opencontainers.image.base.name="ghcr.io/updatecli/releasepost"
LABEL org.opencontainers.image.source="https://github.com/updatecli/releasepost"
# goreleaser dockers_v2 lays out the build context per platform, for instance
# linux/amd64/releasepost and linux/arm64/releasepost.
ARG TARGETPLATFORM
COPY $TARGETPLATFORM/releasepost /usr/local/bin/releasepost
# Same uid and home as the previous Debian based image, so existing volume mounts keep working.
ENV HOME=/home/releasepost
WORKDIR /home/releasepost
USER 1000:1000
ENTRYPOINT [ "/usr/local/bin/releasepost" ]
CMD ["help"]