You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
517 B
Docker
20 lines
517 B
Docker
FROM golang:1.11 as builder
|
|
|
|
WORKDIR /root/
|
|
RUN go get golang.org/x/time/rate && \
|
|
mkdir -p /go/src/github.com/snail007/ && \
|
|
cd /go/src/github.com/snail007/ && \
|
|
git clone https://github.com/snail007/goproxy.git && \
|
|
cd goproxy && \
|
|
sed -i 's@"proxy/@"github.com/snail007/goproxy/@g' config.go main.go services/*.go && \
|
|
CGO_ENABLED=0 go get . && \
|
|
cp auth-file blocked direct /go/bin
|
|
|
|
|
|
FROM alpine:latest
|
|
WORKDIR /root/
|
|
COPY --from=builder /go/bin/* /root/
|
|
|
|
ENTRYPOINT [ "./goproxy"]
|
|
|