mirror of
https://github.com/ScuroNeko/mtg.git
synced 2026-08-31 11:44:02 +03:00
Updates for dockerfile
This commit is contained in:
+6
-8
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user