Skip to content

Commit

Permalink
Merge pull request #1248 from alphagov/nsabri1/update-clam-engine
Browse files Browse the repository at this point in the history
Updating ClamAV engine with offical version 1.2.1
  • Loading branch information
nsabri1 authored Dec 1, 2023
2 parents 8b985dc + 06460bd commit 8573c6d
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ARG ruby_version=3.2.2
ARG base_image=ghcr.io/alphagov/govuk-ruby-base:$ruby_version
ARG builder_image=ghcr.io/alphagov/govuk-ruby-builder:$ruby_version

ARG clam_engine=clamav-1.2.1.linux.x86_64.deb

FROM $builder_image AS builder

Expand All @@ -14,13 +14,15 @@ RUN bootsnap precompile --gemfile .

FROM $base_image

ARG clam_engine
ENV GOVUK_APP_NAME=asset-manager

# TODO: move ClamAV into a completely separate service.
RUN install_packages clamav clamav-daemon clamdscan shared-mime-info && \
rm -fr /etc/clamav/* && \
mkdir -p /var/run/clamav && \
chown app:app /var/run/clamav /var/lib/clamav
RUN install_packages wget shared-mime-info && \
wget https://www.clamav.net/downloads/production/$clam_engine && \
apt install ./$clam_engine && rm ./$clam_engine && \
mkdir -p /var/run/clamav /var/lib/clamav /usr/local/share/clamav && \
chown app:app /var/run/clamav /var/lib/clamav /usr/local/share/clamav

WORKDIR $APP_HOME
COPY --from=builder $BUNDLE_PATH $BUNDLE_PATH
Expand Down

0 comments on commit 8573c6d

Please sign in to comment.