Skip to content

Add ClamAV mirror overrides for definition downloads#304

Open
docwho2 wants to merge 1 commit intomainfrom
codex/investigate-build-failure-causes
Open

Add ClamAV mirror overrides for definition downloads#304
docwho2 wants to merge 1 commit intomainfrom
codex/investigate-build-failure-causes

Conversation

@docwho2
Copy link
Owner

@docwho2 docwho2 commented Feb 8, 2026

Motivation

  • GitHub-hosted builds occasionally see throttling or connectivity issues when freshclam downloads virus definitions, which causes Docker image builds to fail.
  • Provide a way to point freshclam at alternative mirrors and add retry/timeouts so definition fetches are more resilient during CI builds.

Description

  • Add Docker build arguments CLAMAV_MIRROR and CLAMAV_MIRROR_FALLBACK and use them to generate a temporary freshclam config with MaxAttempts, ConnectTimeout, and ReceiveTimeout before running freshclam in the builder stage (cdk/Dockerfile).
  • Pass optional build args from the CDK construct by adding buildArgs(getDockerBuildArgs()) to the DockerImageAsset and sourcing values from environment variables in ClamavLambdaStack (cdk/src/main/java/.../ClamavLambdaStack.java).
  • Document how to override mirrors via CLAMAV_MIRROR and CLAMAV_MIRROR_FALLBACK in README.md so CI (e.g., GitHub Actions) can be directed to private or alternate mirrors.
  • Files changed: cdk/Dockerfile, cdk/src/main/java/cloud/cleo/clamav/cdk/ClamavLambdaStack.java, and README.md.

Testing

  • No automated tests were executed as part of this change (mvn/cdk synth/Docker build were not run in CI for this PR).

Codex Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant