mirror of
https://github.com/rjNemo/go-pass-gen
synced 2026-06-06 02:46:40 +00:00
22 lines
No EOL
302 B
Docker
22 lines
No EOL
302 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 ./cmd/server
|
|
|
|
|
|
FROM alpine:latest
|
|
|
|
RUN apk update --no-cache
|
|
|
|
WORKDIR /app
|
|
COPY --from=builder /app/dist /app/dist
|
|
|
|
CMD ["./dist"] |