Skip to content

Commit b471bf4

Browse files
committed
Reduce the context of the runner image build
When building the yq and syft binaries for the runner image, only copy the `tools` directory since that's all that is needed. This has the added benefit of making development easier by leveraging caching of those layers during local re-builds. Signed-off-by: Luiz Carvalho <[email protected]>
1 parent 0aaf1a3 commit b471bf4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@ FROM brew.registry.redhat.io/rh-osbs/openshift-golang-builder:v1.23@sha256:ca0c7
66

77
WORKDIR /build
88

9-
COPY . .
9+
COPY ./tools .
1010

1111
ENV GOBIN=/usr/local/bin/
1212

1313
RUN \
14-
cd tools/yq && \
14+
cd yq && \
1515
go install -trimpath --mod=readonly github.com/mikefarah/yq/v4 && \
1616
yq --version
1717

1818
RUN \
19-
cd tools/syft && \
19+
cd syft && \
2020
go install -trimpath --mod=readonly github.com/anchore/syft/cmd/syft && \
2121
syft version
2222

0 commit comments

Comments
 (0)