github.com/igoogolx/clash@v1.19.8/Dockerfile (about)

     1  FROM --platform=${BUILDPLATFORM} golang:alpine as builder
     2  
     3  RUN apk add --no-cache make git ca-certificates && \
     4      wget -O /Country.mmdb https://github.com/Dreamacro/maxmind-geoip/releases/latest/download/Country.mmdb
     5  WORKDIR /workdir
     6  COPY --from=tonistiigi/xx:golang / /
     7  ARG TARGETOS TARGETARCH TARGETVARIANT
     8  
     9  RUN --mount=target=. \
    10      --mount=type=cache,target=/root/.cache/go-build \
    11      --mount=type=cache,target=/go/pkg/mod \
    12      make BINDIR= ${TARGETOS}-${TARGETARCH}${TARGETVARIANT} && \
    13      mv /clash* /clash
    14  
    15  FROM alpine:latest
    16  LABEL org.opencontainers.image.source="https://github.com/Dreamacro/clash"
    17  
    18  COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
    19  COPY --from=builder /Country.mmdb /root/.config/clash/
    20  COPY --from=builder /clash /
    21  ENTRYPOINT ["/clash"]