forked from 9seconds/mtg
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
36 lines (27 loc) · 777 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
###############################################################################
# BUILD STAGE
FROM golang:1.12-alpine
RUN set -x \
&& apk --no-cache --update add \
bash \
ca-certificates \
curl \
git \
make \
upx
COPY . /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
###############################################################################
# PACKAGE STAGE
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
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