Files
kcptun/Dockerfile
T
xtaci 5ad73ea8eb Squashed commit of the following:
commit 90b1b24d0d
Author: xtaci <daniel820313@gmail.com>
Date:   Fri Jul 28 00:56:06 2023 +0800

    upd Dockerfile

commit 3349f6118b
Author: xtaci <daniel820313@gmail.com>
Date:   Fri Jul 28 00:44:26 2023 +0800

    upd dockerfile
2023-07-28 01:01:15 +08:00

18 lines
638 B
Docker

FROM golang:1.20.6-alpine3.18 as builder
MAINTAINER xtaci <daniel820313@gmail.com>
ENV GO111MODULE=on
RUN apk update && \
apk upgrade && \
apk add git gcc libc-dev linux-headers
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 /client /bin
COPY --from=builder /server /bin
EXPOSE 29900/udp
EXPOSE 12948