Skip to content

Commit

Permalink
Update Dockerfile
Browse files Browse the repository at this point in the history
Should create the base layer of apk add first so the cache is not invalidated when code changes
Should not apk/apt upgrade in docker images (bloats image)
  • Loading branch information
chadgrant committed Jan 2, 2020
1 parent 41818f5 commit 279a368
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
FROM golang:1.12.5-alpine

RUN apk add --update --no-cache git make \
&& go get golang.org/x/tools/go/vcs

COPY . $GOPATH/src/github.com/gojp/goreportcard

WORKDIR $GOPATH/src/github.com/gojp/goreportcard

RUN apk update && apk upgrade && apk add --no-cache git make \
&& go get golang.org/x/tools/go/vcs \
&& ./scripts/make-install.sh
RUN ./scripts/make-install.sh

EXPOSE 8000

Expand Down

0 comments on commit 279a368

Please sign in to comment.