ShawnAI commited on
Commit
21cb055
·
1 Parent(s): 5b99dec

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +11 -0
Dockerfile ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ARG GOLANG_VERSION="1.19.1"
2
+
3
+ FROM golang:$GOLANG_VERSION-alpine as builder
4
+ RUN apk --no-cache add tzdata
5
+ WORKDIR /go/src/github.com/serjs/socks5
6
+ COPY . .
7
+ RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -ldflags '-s' -o ./socks5
8
+
9
+ FROM gcr.io/distroless/static:nonroot
10
+ COPY --from=builder /go/src/github.com/serjs/socks5/socks5 /
11
+ ENTRYPOINT ["/socks5"]