From 5ad73ea8eb93e27e19772c78151e69c19e2a42bc Mon Sep 17 00:00:00 2001 From: xtaci Date: Fri, 28 Jul 2023 01:01:15 +0800 Subject: [PATCH] Squashed commit of the following: commit 90b1b24d0d458fd5fb612ecc0841c946337ea237 Author: xtaci Date: Fri Jul 28 00:56:06 2023 +0800 upd Dockerfile commit 3349f6118b78c60b0fb0db088af612aabfc09bfa Author: xtaci Date: Fri Jul 28 00:44:26 2023 +0800 upd dockerfile --- Dockerfile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 720ab6a..5fc8606 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,10 +4,14 @@ ENV GO111MODULE=on RUN apk update && \ apk upgrade && \ apk add git gcc libc-dev linux-headers -RUN go get -ldflags "-X main.VERSION=$(date -u +%Y%m%d) -s -w" github.com/xtaci/kcptun/client && go get -ldflags "-X main.VERSION=$(date -u +%Y%m%d) -s -w" github.com/xtaci/kcptun/server +RUN git clone https://github.com/xtaci/kcptun.git +RUN cd kcptun && \ + go build -mod=vendor -ldflags "-X main.VERSION=$(date -u +%Y%m%d) -s -w" -o /client github.com/xtaci/kcptun/client && \ + go build -mod=vendor -ldflags "-X main.VERSION=$(date -u +%Y%m%d) -s -w" -o /server github.com/xtaci/kcptun/server FROM alpine:3.18 RUN apk add --no-cache iptables -COPY --from=builder /go/bin /bin +COPY --from=builder /client /bin +COPY --from=builder /server /bin EXPOSE 29900/udp EXPOSE 12948