github.com/AntonOrnatskyi/goproxy@v0.0.0-20190205095733-4526a9fa18b4/docker/Dockerfile (about) 1 FROM golang:alpine AS builder 2 WORKDIR $GOPATH 3 ARG GOPROXY_VERSION=master 4 RUN apk update; apk upgrade; \ 5 apk add --no-cache ca-certificates git; \ 6 cd /go/src/; \ 7 mkdir -p github.com/snail007; \ 8 cd github.com/snail007; \ 9 git clone --depth=1 https://github.com/AntonOrnatskyi/goproxy.git; \ 10 cd goproxy; \ 11 git checkout ${GOPROXY_VERSION}; \ 12 CGO_ENABLED=0 GOOS=linux go build -ldflags "-s -w" -a -installsuffix cgo -o proxy; \ 13 chmod 0777 proxy 14 15 FROM debian:stable-slim 16 COPY --from=builder /go/src/github.com/AntonOrnatskyi/goproxy/proxy /usr/local/bin/ 17 # RUN chmod 0777 /usr/local/bin/proxy 18 EXPOSE 80 443 19 CMD /usr/local/bin/proxy http -t tcp -p :80,:443