This commit is contained in:
parent
7e1ba5dd4d
commit
2008c9f999
@ -1,2 +1,2 @@
|
||||
kind: template
|
||||
load: docker-multiarch.yaml
|
||||
load: docker.yaml
|
||||
|
10
Dockerfile
10
Dockerfile
@ -1,4 +1,5 @@
|
||||
FROM golang:1.21 as build
|
||||
FROM golang:1.21-alpine as build
|
||||
RUN apk add ca-certificates
|
||||
|
||||
WORKDIR /godoor
|
||||
|
||||
@ -8,10 +9,15 @@ RUN go mod download && go mod verify
|
||||
|
||||
|
||||
COPY . .
|
||||
RUN make build
|
||||
|
||||
ENV GOBUILDLDFLAGS="-linkmode 'external' -extldflags '-static'"
|
||||
ENV GOOS=linux
|
||||
ENV GOARCH=arm64
|
||||
RUN go build -tags netgo .
|
||||
|
||||
FROM scratch
|
||||
WORKDIR /
|
||||
COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
|
||||
COPY --from=build /godoor/godoor /godoor
|
||||
|
||||
ENTRYPOINT ["/godoor"]
|
||||
|
Loading…
Reference in New Issue
Block a user