From dbd3d3c2663ce42171789dddab35692a82a9b2a1 Mon Sep 17 00:00:00 2001 From: 9seconds Date: Tue, 19 May 2020 11:26:08 +0300 Subject: [PATCH] Updates for dockerfile --- Dockerfile | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index 9b5d1b3..c0ce426 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ ############################################################################### # BUILD STAGE -FROM golang:1.14-alpine +FROM golang:1.14-alpine AS build RUN set -x \ && apk --no-cache --update add \ @@ -13,9 +13,9 @@ RUN set -x \ upx COPY . /go/src/github.com/9seconds/mtg/ +WORKDIR /go/src/github.com/9seconds/mtg RUN set -x \ - && cd /go/src/github.com/9seconds/mtg \ && make -j 4 static \ && upx --ultra-brute -qq ./mtg @@ -26,11 +26,9 @@ RUN set -x \ FROM scratch ENTRYPOINT ["/mtg"] -ENV MTG_IP=0.0.0.0 \ - MTG_PORT=3128 \ - MTG_STATS_IP=0.0.0.0 \ - MTG_STATS_PORT=3129 +ENV MTG_BIND=0.0.0.0:3128 \ + MTG_STATS_BIND=0.0.0.0:3129 EXPOSE 3128 3129 -COPY --from=0 /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt -COPY --from=0 /go/src/github.com/9seconds/mtg/mtg /mtg +COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt +COPY --from=build /go/src/github.com/9seconds/mtg/mtg /mtg