14 lines
359 B
Plaintext
14 lines
359 B
Plaintext
FROM --platform=${TARGETPLATFORM} golang:latest as builder
|
|
|
|
ARG CGO_ENABLED=0
|
|
|
|
COPY ./ /root/src/
|
|
WORKDIR /root/src/
|
|
RUN go build -ldflags "-s -w -X main.version=$(git describe --tags --long --always)" -trimpath -o mosdns
|
|
|
|
|
|
FROM --platform=${TARGETPLATFORM} alpine:latest
|
|
|
|
COPY --from=builder /root/src/mosdns /usr/bin/
|
|
|
|
RUN apk add --no-cache ca-certificates |