Skip to content

Commit 22a0db8

Browse files
authored
chore: enable non-interactively mode for UBI9 image (#2814)
* chore: enable non-interactively mode for UBI9 image * chore: maximize build space for the integration tests
1 parent baa8f8e commit 22a0db8

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

.github/workflows/build.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,18 @@ jobs:
119119
runs-on: ubuntu-latest
120120
timeout-minutes: 30
121121
steps:
122+
- name: Maximize build space
123+
uses: AdityaGarg8/remove-unwanted-software@v5
124+
with:
125+
remove-android: 'true'
126+
remove-dotnet: 'true'
127+
remove-haskell: 'true'
128+
remove-codeql: 'true'
129+
remove-docker-images: 'true'
130+
remove-large-packages: 'true'
131+
remove-cached-tools: 'true'
132+
remove-swapfile: 'true'
133+
122134
- name: Checkout code
123135
uses: actions/checkout@v4
124136

build/trivy-operator/Dockerfile.ubi9

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33

44
FROM registry.access.redhat.com/ubi9/ubi-minimal@sha256:34880b64c07f28f64d95737f82f891516de9a3b43583f39970f7bf8e4cfa48b7
55

6-
RUN microdnf install shadow-utils
6+
# Install shadow-utils non-interactively and clean up package metadata to keep image small
7+
RUN microdnf -y install shadow-utils \
8+
&& microdnf clean all
79
RUN useradd -u 10000 trivyoperator
810
WORKDIR /opt/bin/
911
COPY trivy-operator /usr/local/bin/trivy-operator

0 commit comments

Comments
 (0)