feat: update Dockerfile
This commit is contained in:
parent
845bb4db01
commit
7442579c24
|
|
@ -5,7 +5,7 @@ COPY go.* ./
|
||||||
RUN go mod download
|
RUN go mod download
|
||||||
COPY . .
|
COPY . .
|
||||||
RUN apk update && apk add upx ca-certificates openssl && update-ca-certificates
|
RUN apk update && apk add upx ca-certificates openssl && update-ca-certificates
|
||||||
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags "-s -w" -o /bin/api-binary ./cmd/example/main.go
|
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags "-s -w" -o /bin/api-binary ./main.go
|
||||||
RUN upx -9 /bin/api-binary
|
RUN upx -9 /bin/api-binary
|
||||||
|
|
||||||
FROM gcr.io/distroless/static:nonroot
|
FROM gcr.io/distroless/static:nonroot
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue