Fix Docker image
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Lauri Võsandi 2023-08-24 22:35:23 +03:00
parent 7e1ba5dd4d
commit 2008c9f999
2 changed files with 9 additions and 3 deletions

View File

@ -1,2 +1,2 @@
kind: template
load: docker-multiarch.yaml
load: docker.yaml

View File

@ -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"]