socks5-server/Dockerfile

14 lines
469 B
Docker
Raw Permalink Normal View History

ARG GOLANG_VERSION="1.16.5"
FROM golang:$GOLANG_VERSION-alpine as builder
RUN apk --no-cache add tzdata
WORKDIR /go/src/github.com/serjs/socks5
2018-04-15 21:08:32 +03:00
COPY . .
2018-04-16 09:24:35 +03:00
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -ldflags '-s' -o ./socks5
2018-04-15 21:08:32 +03:00
FROM scratch
COPY --from=builder /usr/share/zoneinfo /usr/share/zoneinfo
2018-04-16 09:24:35 +03:00
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY --from=builder /go/src/github.com/serjs/socks5/socks5 /
2018-04-15 21:08:32 +03:00
ENTRYPOINT ["/socks5"]