Initial commit of Dockerfile
This commit is contained in:
parent
4b4b83c28e
commit
6e94b133e9
1 changed files with 31 additions and 0 deletions
31
Dockerfile
Normal file
31
Dockerfile
Normal file
|
@ -0,0 +1,31 @@
|
|||
FROM alpine:3.6
|
||||
LABEL maintainer "Tony Blyler <me@tonyblyler.com>"
|
||||
|
||||
ENV GOPATH /huproxy-build
|
||||
ENV APK_ADD_PKGS "libc-dev git go@edge"
|
||||
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
|
||||
|
||||
# install latest golang
|
||||
RUN apk add --no-cache ${APK_ADD_PKGS}
|
||||
|
||||
# build huproxy
|
||||
RUN go get github.com/google/huproxy
|
||||
|
||||
# remove apk packages
|
||||
RUN apk del ${APK_DEL_PKGS}
|
||||
|
||||
# move huproxy binary
|
||||
RUN mv "${GOPATH}/bin/huproxy" /
|
||||
|
||||
# cleanup GOPATH
|
||||
RUN rm -Rf "${GOPATH}"
|
||||
|
||||
EXPOSE 8086
|
||||
|
||||
ENTRYPOINT ["./huproxy"]
|
||||
CMD ["-listen", ":8086"]
|
Loading…
Reference in a new issue