Decrease docker image size

Hi,

this decreases the docker image size from 487MB to 27MB by removing a filesystem layer with the installed dependencies.

I guess could be even further improved by using a multi-stage build. I might look into that later on.

Best
pull/10/head
Thomas G 4 years ago committed by Elis Popescu
parent b9c1dd419c
commit d2481377f7

@ -10,10 +10,8 @@ COPY . /go/src/github.com/elisescu/tty-proxy
RUN apk update && \
apk add -u $build_deps $runtime_deps && \
adduser -D -H -h / -u $user_id tty-proxy
RUN cd /go/src/github.com/elisescu/tty-proxy && \
adduser -D -H -h / -u $user_id tty-proxy && \
cd /go/src/github.com/elisescu/tty-proxy && \
GOPATH=/go go get github.com/go-bindata/go-bindata/... && \
GOPATH=/go /go/bin/go-bindata --prefix static -o gobindata.go static/* && \
GOPATH=/go go build && \

Loading…
Cancel
Save