Update to shrink image size
This commit is contained in:
parent
6e94b133e9
commit
caeec7cfaa
1 changed files with 11 additions and 16 deletions
17
Dockerfile
17
Dockerfile
|
@ -8,22 +8,17 @@ ENV APK_DEL_PKGS "libc-dev git go"
|
|||
RUN mkdir -p "${GOPATH}"
|
||||
|
||||
# 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
|
||||
RUN apk add --no-cache ${APK_ADD_PKGS}
|
||||
|
||||
apk add --no-cache ${APK_ADD_PKGS} && \
|
||||
# build huproxy
|
||||
RUN go get github.com/google/huproxy
|
||||
|
||||
go get github.com/google/huproxy && \
|
||||
# remove apk packages
|
||||
RUN apk del ${APK_DEL_PKGS}
|
||||
|
||||
apk del ${APK_DEL_PKGS} && \
|
||||
# move huproxy binary
|
||||
RUN mv "${GOPATH}/bin/huproxy" /
|
||||
|
||||
mv "${GOPATH}/bin/huproxy" / && \
|
||||
# cleanup GOPATH
|
||||
RUN rm -Rf "${GOPATH}"
|
||||
rm -Rf "${GOPATH}"
|
||||
|
||||
EXPOSE 8086
|
||||
|
||||
|
|
Loading…
Reference in a new issue