mirror of
https://github.com/ScuroNeko/mtg.git
synced 2026-09-01 11:24:02 +03:00
Merge pull request #146 from 9seconds/fix-docker-image
Updates for dockerfile
This commit is contained in:
+6
-8
@@ -1,7 +1,7 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
# BUILD STAGE
|
# BUILD STAGE
|
||||||
|
|
||||||
FROM golang:1.14-alpine
|
FROM golang:1.14-alpine AS build
|
||||||
|
|
||||||
RUN set -x \
|
RUN set -x \
|
||||||
&& apk --no-cache --update add \
|
&& apk --no-cache --update add \
|
||||||
@@ -13,9 +13,9 @@ RUN set -x \
|
|||||||
upx
|
upx
|
||||||
|
|
||||||
COPY . /go/src/github.com/9seconds/mtg/
|
COPY . /go/src/github.com/9seconds/mtg/
|
||||||
|
WORKDIR /go/src/github.com/9seconds/mtg
|
||||||
|
|
||||||
RUN set -x \
|
RUN set -x \
|
||||||
&& cd /go/src/github.com/9seconds/mtg \
|
|
||||||
&& make -j 4 static \
|
&& make -j 4 static \
|
||||||
&& upx --ultra-brute -qq ./mtg
|
&& upx --ultra-brute -qq ./mtg
|
||||||
|
|
||||||
@@ -26,11 +26,9 @@ RUN set -x \
|
|||||||
FROM scratch
|
FROM scratch
|
||||||
|
|
||||||
ENTRYPOINT ["/mtg"]
|
ENTRYPOINT ["/mtg"]
|
||||||
ENV MTG_IP=0.0.0.0 \
|
ENV MTG_BIND=0.0.0.0:3128 \
|
||||||
MTG_PORT=3128 \
|
MTG_STATS_BIND=0.0.0.0:3129
|
||||||
MTG_STATS_IP=0.0.0.0 \
|
|
||||||
MTG_STATS_PORT=3129
|
|
||||||
EXPOSE 3128 3129
|
EXPOSE 3128 3129
|
||||||
|
|
||||||
COPY --from=0 /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
|
COPY --from=build /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 /go/src/github.com/9seconds/mtg/mtg /mtg
|
||||||
|
|||||||
Reference in New Issue
Block a user