From 6bb25714f6cbb2c1ebc75c886136efa55ec0b766 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Mon, 19 Feb 2024 15:52:48 +0100 Subject: [PATCH] Update Dockerfile --- socks5-proxy/Dockerfile | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/socks5-proxy/Dockerfile b/socks5-proxy/Dockerfile index daa244428..1237c7c98 100644 --- a/socks5-proxy/Dockerfile +++ b/socks5-proxy/Dockerfile @@ -14,9 +14,18 @@ # 1 Build Image # ################# +ARG GOLANG_VERSION="1.19.1" + +FROM golang:$GOLANG_VERSION-alpine as builder +RUN apk --no-cache add tzdata +WORKDIR /go/src/github.com/serjs/socks5 +COPY . . +RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -ldflags '-s' -o ./socks5 + ARG BUILD_VERSION ARG BUILD_FROM FROM ${BUILD_FROM} +COPY --from=builder /go/src/github.com/serjs/socks5/socks5 / ################## # 2 Modify Image #