From 5706c8afa4d5b6f5c0a55b920165ba4327b9373b Mon Sep 17 00:00:00 2001 From: James Mills Date: Sun, 12 Feb 2017 21:50:42 -0800 Subject: Fix deploying with Docker --- Dockerfile | 15 ++++++++++++++- README.md | 7 ++++++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 1dad4b6..bf5cab6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,4 +2,17 @@ FROM golang:alpine EXPOSE 80/tcp -ENTRYPOINT ["/gopherproxy"] +ENTRYPOINT ["gopherproxy"] +CMD [] + +RUN \ + apk add --update git && \ + rm -rf /var/cache/apk/* + +RUN mkdir -p /go/src/github.com/prologic/gopherproxy +WORKDIR /go/src/github.com/prologic/gopherproxy + +COPY . /go/src/github.com/prologic/gopherproxy + +RUN go get -v -d +RUN go install -v github.com/prologic/gopherproxy/... diff --git a/README.md b/README.md index 9d6609f..c5cf84d 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,12 @@ gopherproxy is written in Go (#golang) using the ## Installation - $ go install github.com/prologic/gopherproxy + $ go install github.com/prologic/gopherproxy/... + +### Docker + + $ docker build -t gopherproxy . + $ docker run -p 80:80 gopherproxy -uri floodgap.com ## Usage -- cgit v1.2.3-70-g09d2