2019-01-10 05:23:55 +00:00
|
|
|
FROM golang:alpine AS build
|
2018-12-26 14:03:22 +00:00
|
|
|
|
2019-01-10 05:23:55 +00:00
|
|
|
RUN apk add --no-cache -U make
|
2018-12-26 14:03:22 +00:00
|
|
|
|
2019-01-10 05:23:55 +00:00
|
|
|
COPY . /src/goproxy
|
2019-01-21 07:18:13 +00:00
|
|
|
RUN cd /src/goproxy &&\
|
|
|
|
export CGO_ENABLED=0 &&\
|
|
|
|
make
|
2019-01-10 05:23:55 +00:00
|
|
|
|
|
|
|
FROM alpine:latest
|
|
|
|
|
|
|
|
RUN apk add --no-cache -U git mercurial subversion bzr fossil
|
|
|
|
|
2019-01-21 07:18:13 +00:00
|
|
|
COPY --from=build /src/goproxy/bin/goproxy /goproxy
|
2019-01-10 05:23:55 +00:00
|
|
|
|
|
|
|
VOLUME /go
|
2018-12-29 06:49:49 +00:00
|
|
|
|
2018-12-26 14:03:22 +00:00
|
|
|
EXPOSE 8081
|
|
|
|
|
2019-01-10 05:23:55 +00:00
|
|
|
ENTRYPOINT ["/goproxy"]
|
|
|
|
CMD []
|