Can we dockerize this clamd service
Opened this issue · 6 comments
I want to install this in one of my exiting containers as a service and I am following #1, but I am getting the following error
Step 10/12 : RUN freshclam --install ---> Running in a46aaf77ca2d The command 'cmd /S /C freshclam --install' returned a non-zero code: 3221225781
@saurabrana how you dockerized windows? 3221225781
should be 0xc0000135
(STATUS_DLL_NOT_FOUND) did you also copied libfreshclam.dll
and libclamav.dll
?
@sherpya yes following is the content of my directory in my container
Also, I am using following base image "mcr.microsoft.com/windows:2004
"
if you are using x64 build you also need https://support.microsoft.com/it-it/help/2977003/the-latest-supported-visual-c-downloads
you can use this software to check needed files, I suppose you can run VC_redist.x64.exe /passive /quiet /norestart
when building the image
Thanks @sherpya
After installing clamd successfully > launching freshclam is failing in downloading database with error:
Giving up on https://database.clamav.net...
WARNING: Download failed (60) WARNING: Message: SSL peer certificate or SSH remote key was not OK
WARNING: Can't download daily.cvd from https://database.clamav.net/daily.cvd
If I try to run freshclam directly from inside the container > it works
But if I build container through dockerfile > I am getting this error.
Any thoughts?
are you sure the docker image has a working crypto setup? curl+openssl on windows uses windows native schannel, so you must have cloudflare root ca in your image, alternatively you can use:
DatabaseMirror http://database.clamav.net
in freshclam config file
It's not Windows, but if you're interested, the upstream clamav project recently added official docker images on Docker Hub. Presently only images "unstable" (tracking the development branch) are available. The 0.104.0 version will be the first stable "official" image: https://docs.clamav.net/manual/Installing/Docker.html