-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Dockerfile: merge nginx into django #11182
Conversation
DryRun Security SummaryThe pull request focuses on improving the build process and deployment of the DefectDojo application, a web-based open-source vulnerability management tool, by updating the Dockerfile configurations, the Docker Compose file, and the Debian-based Dockerfile, while ensuring ongoing security through dependency version management, environment variable security, static file handling, and Nginx configuration review. Expand for full summarySummary: The code changes in this pull request are focused on improving the build process and deployment of the DefectDojo application, a web-based open-source vulnerability management tool. The changes include updates to the Dockerfile configurations, the Docker Compose file, and the Debian-based Dockerfile. From an application security perspective, the changes do not appear to introduce any obvious security concerns. However, there are a few areas that should be reviewed and monitored to ensure the ongoing security of the application:
Overall, the changes in this pull request appear to be focused on improving the build process and deployment of the DefectDojo application, and they do not seem to introduce any obvious security concerns. However, it's always important to review the entire codebase and deployment process to ensure that the application is secure and compliant with best practices. Files Changed:
Code AnalysisWe ran Riskiness🟢 Risk threshold not exceeded. |
64d6b96
to
4215ba2
Compare
4215ba2
to
7eb74c2
Compare
I like the idea of simplification. By the way, different images are not mentioned only in the docker-compose file. They are pushed to docker-hub and used in helm charts. Maybe even more. Can you check other places as well, please? |
Hi @kiblik yeah, I did add that note to the description, that many places were missing but I didn’t want to waste the time if the idea of reusing same dockerfile was not welcome. |
Sorry, I missed last paragraph of description. I'm not core maintainer of project. My voice might be supportive but I have no formal power over decision. |
I don't think we should go to that direction, as you going away from the cloud native principles. |
@dsever honestly curious as I'm not familiar with their principles, would you be able to quote or link which principle it goes against? |
@fopina One reason to keep Nginx as a separate container is that it allows users of DefectDojo to choose other options if they want to front DefectDojo with something else. This could be something like Caddy or maybe a LB from their cloud provider. Yes, I understand that the static assets are built into the Nginx container and someone who chooses to use something different to front DefectDojo would need to also handle that situation but that would mean they'd only need to:
So, if for no other reason, I like the fact that keeping Nginx separate gives the community flexibility to change out Nginx without having to modify the other containers needed to run DefectDojo. |
@mtesauro I totally understand that as, for my projects, I don't "bake" static assets into Nginx. I use upstream nginx image with a volume where configuration and assets are placed That said, there might be a confusion: this PR does NOT add nginx to dojo container. Resulting containers are the same. |
@fopina Please see the update I posted earlier today - the project is about to do a fairly significant change/upgrade to the containers for this project. Given that's about to happen, merging two dockerfiles into one doesn't really add much value IMHO. It does break our existing GHA tests. I realize we'll have to update those once the new containers/dockerfiles are in place but why do that work twice when this PR doesn't change any real functionality - rather it create a different style of dockerfile. I'd also prefer to slow roll changes to our containers given the size of our user base. (10+ million pulls). For new hardened container images, we can produce a new image for a period of time to allow people to transition to the new images before we deprecate and eventually stop building the older images. I appreciate and can understand the desire to potentially optimize 2 dockerfiles into a single file but given the potential side effects, the optimization isn't better than the costs. |
Understood and agreed. Impact (known or unknown) was an expected argument against the change and the reason I didn't fully complete it (updating docs and references). I was just confused by which principle this would be against so I would avoid PRs like that again, but I see now it was a misunderstanding. Thanks, I'll close the PR |
#11181 is a "lighter" simplification but I believe this one is much better
By merging nginx as a target of Dockerfile.django:
build
stage going out of sync (and wasting precious cache)django
stage for collectstatic, saving one stage