mirror of
https://github.com/outbackdingo/certificates.git
synced 2026-01-27 10:18:34 +00:00
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:
@@ -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
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user