forked from TrueCloudLab/certificates
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
This commit is contained in:
parent
53f2ecdad9
commit
18555a3cb2
2 changed files with 2 additions and 0 deletions
|
@ -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…
Reference in a new issue