mirror of
https://github.com/bolucat/Archive.git
synced 2025-09-26 20:21:35 +08:00
12 lines
378 B
Docker
12 lines
378 B
Docker
FROM golang:alpine AS builder
|
|
RUN apk update && apk add --no-cache ca-certificates
|
|
WORKDIR /root
|
|
ADD . .
|
|
ARG VERSION
|
|
WORKDIR /root/cmd/nodepass
|
|
RUN env CGO_ENABLED=0 go build -v -trimpath -ldflags "-s -w -X main.version=${VERSION}"
|
|
FROM scratch
|
|
COPY --from=builder /etc/ssl/certs /etc/ssl/certs
|
|
COPY --from=builder /root/cmd/nodepass/nodepass /nodepass
|
|
ENTRYPOINT ["/nodepass"]
|