Split build and download in Dockerfiles

On systems with low resources the command `go mod download` can fail.
This causes long builds of the docker images. This change adds a new
layer in the docker build splitting the build and download in two
steps.

Fixes #1114
pull/1122/head
Mariano Cano 2 years ago
parent 53f2ecdad9
commit 18555a3cb2
No known key found for this signature in database

@ -4,6 +4,7 @@ WORKDIR /src
COPY . .
RUN apk add --no-cache curl git make
RUN make V=1 download
RUN make V=1 bin/step-ca bin/step-awskms-init bin/step-cloudkms-init

@ -5,6 +5,7 @@ COPY . .
RUN apk add --no-cache curl git make
RUN apk add --no-cache gcc musl-dev pkgconf pcsc-lite-dev
RUN make V=1 download
RUN make V=1 GOFLAGS="" build

Loading…
Cancel
Save