Skip to content

Commit

Permalink
feat(clamav): clamav arm64 support using debian based image
Browse files Browse the repository at this point in the history
Signed-off-by: Jonathan Joewono <[email protected]>
  • Loading branch information
jogerj committed Apr 2, 2024
1 parent 437b24c commit 1b4fa60
Showing 1 changed file with 19 additions and 4 deletions.
23 changes: 19 additions & 4 deletions Containers/clamav/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,32 @@
# syntax=docker/dockerfile:latest

# Step 1: Setup base image based on arch

# Probably from this file: https://github.com/Cisco-Talos/clamav-docker/blob/main/clamav/1.3/alpine/Dockerfile
FROM clamav/clamav:1.3.0-44
FROM clamav/clamav:1.3.0-44 as build-amd64

COPY clamav.conf /tmp/clamav.conf
RUN set -ex; \
apk add --no-cache tzdata;

# Probably from this file: https://github.com/Cisco-Talos/clamav-docker/blob/main/clamav/1.3/debian/Dockerfile
FROM clamav/clamav-debian:1.3.0-24 as build-arm64

RUN set -ex; \
apk add --no-cache tzdata; \
cat /tmp/clamav.conf >> /etc/clamav/clamd.conf; \
apt-get update && apt-get install -y tzdata && rm -rf /var/lib/apt/lists/*;

# Step 2: Configure clamav

FROM build-${TARGETARCH} as build

RUN cat /tmp/clamav.conf >> /etc/clamav/clamd.conf; \
rm /tmp/clamav.conf; \
mkdir -p /var/run/clamav /run/lock; \
chown -R clamav:clamav /var/run/clamav /run/clamav /var/log/clamav /var/lock /run/lock; \
chmod 777 -R /var/run/clamav /run/clamav /var/log/clamav /var/lock /run/lock /tmp


COPY clamav.conf /tmp/clamav.conf

VOLUME /var/lib/clamav

USER clamav
Expand Down

0 comments on commit 1b4fa60

Please sign in to comment.