Fix issue with asset packer breaking Docker builds

This commit is contained in:
Vikram Rangnekar
2019-03-28 09:38:05 -04:00
parent 516939bf26
commit f37ee50f7b
5 changed files with 33 additions and 19 deletions

View File

@ -3,7 +3,7 @@ RUN apk update && \
apk add --no-cache git && \
apk add --no-cache upx=3.95-r1
RUN go get github.com/GeertJohan/go.rice/rice && \
RUN go get github.com/mjibson/esc && \
go get github.com/pilu/fresh
WORKDIR /app
@ -11,7 +11,7 @@ ADD . /app
ENV GO111MODULE=on
RUN go mod vendor
RUN rice -i ./serv embed-go && \
RUN go generate ./... && \
CGO_ENABLED=0 GOOS=linux go build -ldflags="-s -w" -o service && \
upx --ultra-brute -qq service && \
upx -t service