2022-11-08 14:41:28 +03:00
|
|
|
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
|
|
|
|
|
2022-11-08 14:55:20 +03:00
|
|
|
FROM scratch
|
2022-11-08 14:41:28 +03:00
|
|
|
COPY --from=builder /go/src/github.com/serjs/socks5/socks5 /
|
|
|
|
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
|
|
|
|
ENTRYPOINT ["/socks5"]
|