mirror of https://github.com/ginuerzh/gost
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
469 B
32 lines
469 B
FROM --platform=$BUILDPLATFORM tonistiigi/xx:1.5.0 AS xx
|
|
|
|
FROM --platform=$BUILDPLATFORM golang:1.23-alpine3.20 AS builder
|
|
|
|
COPY --from=xx / /
|
|
|
|
ARG TARGETPLATFORM
|
|
|
|
RUN xx-info env
|
|
|
|
ENV CGO_ENABLED=0
|
|
|
|
ENV XX_VERIFY_STATIC=1
|
|
|
|
WORKDIR /app
|
|
|
|
COPY . .
|
|
|
|
RUN cd cmd/gost && \
|
|
xx-go build && \
|
|
xx-verify gost
|
|
|
|
FROM alpine:3.20
|
|
|
|
# add iptables for tun/tap
|
|
RUN apk add --no-cache iptables
|
|
|
|
WORKDIR /bin/
|
|
|
|
COPY --from=builder /app/cmd/gost/gost .
|
|
|
|
ENTRYPOINT ["/bin/gost"]
|