Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can we dockerize this clamd service #7

Open
saurabrana opened this issue Jun 9, 2021 · 6 comments
Open

Can we dockerize this clamd service #7

saurabrana opened this issue Jun 9, 2021 · 6 comments

Comments

@saurabrana
Copy link

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

@sherpya
Copy link
Member

sherpya commented Jun 9, 2021

@saurabrana how you dockerized windows? 3221225781 should be 0xc0000135 (STATUS_DLL_NOT_FOUND) did you also copied libfreshclam.dll and libclamav.dll?

@saurabrana
Copy link
Author

saurabrana commented Jun 9, 2021

@sherpya yes following is the content of my directory in my container
image

Also, I am using following base image "mcr.microsoft.com/windows:2004"

@sherpya
Copy link
Member

sherpya commented Jun 9, 2021

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

@anweshadevgoel
Copy link

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

image

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?

@sherpya
Copy link
Member

sherpya commented Jun 9, 2021

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

@micahsnyder
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants