google / tsunami-security-scanner

Tsunami is a general purpose network security scanner with an extensible plugin system for detecting high severity vulnerabilities with high confidence.
Apache License 2.0
8.2k stars 881 forks source link

Minor Dockerfile Improvements #89

Closed aminvakil closed 8 months ago

aminvakil commented 2 years ago

https://docs.docker.com/develop/develop-images/dockerfile_best-practices/ :

In addition, cleaning up the apt cache and removing /var/lib/apt/lists helps keep the image size down.
Since the RUN statement starts with apt-get update, the package cache will always be refreshed prior to apt-get install.

https://github.com/hadolint/hadolint/wiki/SC2046 : Quote the find output which has another command's output that may contain white spaces to cause word splitting.

google-cla[bot] commented 2 years ago

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

:memo: Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

aminvakil commented 2 years ago

@googlebot I signed it!

aminvakil commented 2 years ago

This results in a 18MB reduction on final image from 535MB to 517MB :)

tooryx commented 8 months ago

Hi @aminvakil,

Thank you for your contribution. I will take a look at it soon, but could I kindly ask that you sync against the master branch as the initial PR is a bit old (apologies for this)?

Thank you, ~tooryx

aminvakil commented 8 months ago

Hi @aminvakil,

Thank you for your contribution. I will take a look at it soon, but could I kindly ask that you sync against the master branch as the initial PR is a bit old (apologies for this)?

Thank you, ~tooryx

Hi @tooryx

No problem at all, after all this is not a "must have" improvement. I've done the rebasing, please tell me if there is any other changes necessary for this PR to get merged.

tooryx commented 8 months ago

Thank you @aminvakil! I will review it in the following days.

~tooryx