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

How to optimize keeping the docker container database up to date #6850

Open
13CSherman opened this issue Jul 16, 2024 · 1 comment
Open

How to optimize keeping the docker container database up to date #6850

13CSherman opened this issue Jul 16, 2024 · 1 comment
Labels

Comments

@13CSherman
Copy link

I want to maintain a image with up-to-date vulnerability databases up to 4 hours. I was trying to reduce the pulls to the NVD by recursively building the image and running a database update. ever 4 hours. I noticed the size of the container is expanding exponentially so I was thinking of instead using a multi-stage docker build.

What folders do I need to copy over in a multi-stage docker build?

@aikebah
Copy link
Collaborator

aikebah commented Jul 19, 2024

In a multi-stage build after running the update you would have to copy over the contents of /usr/share/dependency-check/data

If you have an environment with external persistent storage available to your containers you could avoid the periodic container-build/push by mounting the datalocation as a volume (which is what is done in the script referenced in our documentation for running the container - https://github.com/jeremylong/DependencyCheck?tab=readme-ov-file#docker)

Also be aware of that the docker image (which uses the CLI) is only recommended as a scanner of last resort. If your project is built by a tool for which there is a dedicated build-tool based plugin you will typically get much better results (fewer false positives) when you use that plugin for the scan

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

No branches or pull requests

2 participants