Update to shrink image size

This commit is contained in:
Tony Blyler 2017-06-20 17:40:55 -04:00
parent 6e94b133e9
commit caeec7cfaa

View file

@ -8,22 +8,17 @@ ENV APK_DEL_PKGS "libc-dev git go"
RUN mkdir -p "${GOPATH}" RUN mkdir -p "${GOPATH}"
# set up edge repo pin for latest golang version # set up edge repo pin for latest golang version
RUN echo '@edge http://dl-cdn.alpinelinux.org/alpine/edge/community' >> /etc/apk/repositories RUN echo '@edge http://dl-cdn.alpinelinux.org/alpine/edge/community' >> /etc/apk/repositories && \
# install latest golang
# install latest golang apk add --no-cache ${APK_ADD_PKGS} && \
RUN apk add --no-cache ${APK_ADD_PKGS} # build huproxy
go get github.com/google/huproxy && \
# build huproxy # remove apk packages
RUN go get github.com/google/huproxy apk del ${APK_DEL_PKGS} && \
# move huproxy binary
# remove apk packages mv "${GOPATH}/bin/huproxy" / && \
RUN apk del ${APK_DEL_PKGS} # cleanup GOPATH
rm -Rf "${GOPATH}"
# move huproxy binary
RUN mv "${GOPATH}/bin/huproxy" /
# cleanup GOPATH
RUN rm -Rf "${GOPATH}"
EXPOSE 8086 EXPOSE 8086