socks5-server/Dockerfile

13 lines
408 B
Docker
Raw Normal View History

ARG ARCH=CIDEFINED
ARG GOLANG_VERSION="1.12"
FROM $ARCH/golang:$GOLANG_VERSION-alpine as builder
2018-04-15 21:08:32 +03:00
WORKDIR /go/src/github.com/olebedev/socks5
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
2018-04-16 09:24:35 +03:00
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
2018-04-15 21:08:32 +03:00
COPY --from=builder /go/src/github.com/olebedev/socks5/socks5 /
ENTRYPOINT ["/socks5"]