Skip to content

Commit

Permalink
Add workaround for clamav base image problem
Browse files Browse the repository at this point in the history
  • Loading branch information
aspettl committed Nov 2, 2024
1 parent ae32f10 commit 44def89
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/build_and_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,18 @@ jobs:
repository: docker-mailserver/docker-mailserver
submodules: recursive
ref: ${{ matrix.version }}
- name: Check out fixes required for docker build
uses: actions/checkout@v4
with:
sparse-checkout: |
clamav-base-image.patch
sparse-checkout-cone-mode: false
path: patch_files
- name: Apply fixes required for docker build
shell: bash
run: |
patch -p1 -f --no-backup-if-mismatch < patch_files/clamav-base-image.patch
rm -f clamav-base-image.patch
- name: Determine required variable values
id: vars
shell: bash
Expand Down
13 changes: 13 additions & 0 deletions clamav-base-image.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/Dockerfile b/Dockerfile
index 09295a22..f2e48bdd 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -62,7 +62,7 @@ SHELL ["/bin/bash", "-e", "-o", "pipefail", "-c"]
# which would require an extra memory of 500MB+ during an image build.
# When using `COPY --link`, the `--chown` option is only compatible with numeric ID values.
# hadolint ignore=DL3021
-COPY --link --chown=200 --from=docker.io/clamav/clamav:latest /var/lib/clamav /var/lib/clamav
+COPY --link --chown=200 --from=docker.io/clamav/clamav-debian:latest /var/lib/clamav /var/lib/clamav

RUN <<EOF
# `COPY --link --chown=200` has a bug when built by the buildx docker-container driver.

0 comments on commit 44def89

Please sign in to comment.