diff --git a/Dockerfile b/Dockerfile index aa799de..b14358c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,13 @@ FROM golang AS build-env -RUN GO111MODULE=off go get -u github.com/esrrhs/pingtunnel -RUN GO111MODULE=off go get -u github.com/esrrhs/pingtunnel/... -RUN GO111MODULE=off go install github.com/esrrhs/pingtunnel +WORKDIR /app + +COPY go.* ./ +RUN go mod download +COPY . ./ +RUN go build -v -o pingtunnel FROM debian -COPY --from=build-env /go/bin/pingtunnel . +COPY --from=build-env /app/pingtunnel . COPY GeoLite2-Country.mmdb . WORKDIR ./ diff --git a/README.md b/README.md index 91f113f..2a7a4c4 100644 --- a/README.md +++ b/README.md @@ -3,8 +3,9 @@ [](https://github.com/esrrhs/pingtunnel) [](https://github.com/esrrhs/pingtunnel) [![Go Report Card](https://goreportcard.com/badge/github.com/esrrhs/pingtunnel)](https://goreportcard.com/report/github.com/esrrhs/pingtunnel) -[](https://github.com/esrrhs/pingtunnel/releases) -[](https://github.com/esrrhs/pingtunnel/actions) +[](https://github.com/esrrhs/pingtunnel/releases) +[](https://hub.docker.com/repository/docker/esrrhs/pingtunnel) +[](https://github.com/esrrhs/pingtunnel/actions) Pingtunnel is a tool that send TCP/UDP traffic over ICMP.