mosdns/Dockerfile_buildx
dengxiongjian cd761e8145
Some checks are pending
Test mosdns / build (push) Waiting to run
新增Mikrotik API 插入解析ip
2025-07-31 11:28:55 +08:00

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