leverage docker cache for downloading go deps

This commit is contained in:
Frederik Ring 2021-11-23 08:04:48 +01:00
parent 210c7d4540
commit b6ad624115

View File

@ -5,6 +5,7 @@ FROM golang:1.17-alpine as builder
WORKDIR /app WORKDIR /app
COPY go.mod go.sum ./ COPY go.mod go.sum ./
RUN go mod download
COPY cmd/backup/main.go ./cmd/backup/main.go COPY cmd/backup/main.go ./cmd/backup/main.go
RUN go build -o backup cmd/backup/main.go RUN go build -o backup cmd/backup/main.go