-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(STONEINTG-1072): refactoring clamav-db to avoild uploading file
Signed-off-by: Kasem Alem <kalem@kalem-thinkpadp16vgen1.raanaii.csb>
- Loading branch information
Kasem Alem
committed
Nov 25, 2024
1 parent
64627f9
commit 0933429
Showing
1 changed file
with
23 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,30 @@ | ||
FROM registry.access.redhat.com/ubi9/ubi-minimal:9.4-1227.1726694542 | ||
FROM quay.io/enterprise-contract/ec-cli:snapshot@sha256:dc7d404596385e7d3c624ec0492524a1d57efe2b0c10cf0ec2158d49c0290a83 AS ec-cli | ||
|
||
ENV POLICY_PATH="/project" | ||
# Install required packages | ||
RUN rpm -ivh https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm && \ | ||
microdnf -y --setopt=tsflags=nodocs install \ | ||
clamav \ | ||
clamd \ | ||
clamav-update && \ | ||
clamav-update \ | ||
jq \ | ||
tar \ | ||
skopeo && \ | ||
microdnf clean all | ||
COPY whitelist.ign2 /var/lib/clamav/whitelist.ign2 | ||
|
||
COPY clamav/whitelist.ign2 /var/lib/clamav/whitelist.ign2 | ||
COPY test/utils.sh /utils.sh | ||
|
||
# Update ClamAV virus definitions | ||
RUN freshclam | ||
|
||
COPY policies $POLICY_PATH | ||
COPY test/conftest.sh $POLICY_PATH | ||
|
||
# Download and install oc | ||
RUN ARCH="$(uname -m)" && \ | ||
curl -fsSL https://mirror.openshift.com/pub/openshift-v4/$ARCH/clients/ocp/stable/openshift-client-linux.tar.gz --output oc.tar.gz && \ | ||
cp oc.tar.gz /usr/bin/oc && \ | ||
tar -xzvf oc.tar.gz -C /usr/bin && \ | ||
rm oc.tar.gz |