forked from derailed/popeye
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
27 lines (21 loc) · 762 Bytes
/
Dockerfile
File metadata and controls
27 lines (21 loc) · 762 Bytes
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
# -----------------------------------------------------------------------------
# Build...
FROM golang:1.23.5-alpine3.21 AS build
ARG TARGETOS
ARG TARGETARCH
WORKDIR /popeye
COPY go.mod go.sum main.go Makefile ./
COPY internal internal
COPY cmd cmd
COPY types types
COPY pkg pkg
RUN apk --no-cache add make git gcc libc-dev curl ca-certificates binutils-gold && \
CGO_ENABLED=0 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} make build
# -----------------------------------------------------------------------------
# Image...
FROM alpine:3.21.2
COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
COPY --from=build /popeye/execs/popeye /bin/popeye
RUN adduser -u 5000 -D nonroot
USER 5000
ENTRYPOINT [ "/bin/popeye" ]