mirror of
https://github.com/rjNemo/go-pass-gen
synced 2026-06-06 02:46:40 +00:00
20 lines
No EOL
273 B
Docker
20 lines
No EOL
273 B
Docker
FROM golang:1.17-alpine AS builder
|
|
|
|
ENV GOOS linux
|
|
RUN apk update --no-cache
|
|
|
|
WORKDIR /app
|
|
|
|
COPY go.* .
|
|
RUN go mod download
|
|
|
|
COPY . .
|
|
RUN go build -ldflags="-s -w" -o dist
|
|
|
|
|
|
FROM gcr.io/distroless/static
|
|
|
|
WORKDIR /app
|
|
COPY --from=builder /app/dist /app/dist
|
|
|
|
CMD ["./dist"] |