Update Dockerfile to get dependencies before copying files

This should speed up build time on updates.
This commit is contained in:
Dusty Pianalto 2020-06-03 21:32:32 -08:00
parent 795f396a19
commit 54e844793a

View File

@ -1,11 +1,13 @@
FROM golang:1.14-alpine FROM golang:1.14-alpine
WORKDIR /go/src/Goff WORKDIR /go/src/Goff
COPY . . COPY ./go.mod .
RUN apk add --no-cache git RUN apk add --no-cache git
RUN go get -d -v ./... RUN go get -d -v ./...
COPY . .
RUN go install -v ./... RUN go install -v ./...
ENTRYPOINT /go/bin/goff ENTRYPOINT /go/bin/goff