Ver Fonte

add dockerfile

Vladislav Yarmak há 1 ano atrás
pai
commit
916204836d
1 ficheiros alterados com 12 adições e 0 exclusões
  1. 12 0
      Dockerfile

+ 12 - 0
Dockerfile

@@ -0,0 +1,12 @@
+FROM golang AS build
+
+ARG GIT_DESC=undefined
+
+WORKDIR /go/src/github.com/Snawoot/dtlspipe
+COPY . .
+RUN CGO_ENABLED=0 go build -a -tags netgo -ldflags '-s -w -extldflags "-static" -X main.version='"$GIT_DESC" ./cmd/dtlspipe
+
+FROM scratch
+COPY --from=build /go/src/github.com/Snawoot/dtlspipe/dtlspipe /
+USER 9999:9999
+ENTRYPOINT ["/dtlspipe"]