Optimize dockerfile

This commit is contained in:
9seconds
2018-07-28 12:30:47 +03:00
parent 8906ae0db0
commit 8733f6d191
3 changed files with 13 additions and 4 deletions
+8 -2
View File
@@ -13,11 +13,17 @@ RUN set -x \
upx \
&& update-ca-certificates
ADD . /go/src/github.com/9seconds/mtg
COPY Gopkg.toml Gopkg.lock Makefile /go/src/github.com/9seconds/mtg/
RUN set -x && \
cd /go/src/github.com/9seconds/mtg && \
make -j 4 prepare && \
make vendor
COPY . /go/src/github.com/9seconds/mtg
RUN set -x \
&& cd /go/src/github.com/9seconds/mtg \
&& make clean \
&& make -j 4 static \
&& upx --ultra-brute -qq ./mtg