-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
21 lines (16 loc) · 723 Bytes
/
Copy pathDockerfile
File metadata and controls
21 lines (16 loc) · 723 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# Consumed by GoReleaser: it copies the already cross-compiled binary out of the
# build context rather than compiling, so the image build is fast and ships the
# same static binary every other artifact does.
#
# GoReleaser builds one multi-platform image with buildx and stages each
# platform's binary under a $TARGETPLATFORM directory (e.g. linux/amd64/) in the
# build context, so the COPY line selects the right one through the automatic
# TARGETPLATFORM build arg.
FROM alpine:3.21
ARG TARGETPLATFORM
# ca-certificates for HTTPS; tzdata for sane timestamps.
RUN apk add --no-cache ca-certificates tzdata \
&& adduser -D -H -u 10001 hn2
COPY $TARGETPLATFORM/hn2 /usr/bin/hn2
USER hn2
ENTRYPOINT ["/usr/bin/hn2"]