Skip to content

Conversation

@fopina
Copy link
Contributor

@fopina fopina commented Sep 17, 2025

Description

This is a follow up from the discussion on #13162 related to keeping changes to Dockerfiles at a minimum for now.
I've taken just the wheel dropping piece of that PR and opened this one with it.

Out of that PR, this is the one with most benefit (drop 1/6 of image size) with least changes.
Also, part of that PR was already merged in #13095

No build time improvement, but considerable size reduction which helps in CI with pushing and pulling the images, as not every setup has the docker registry sitting right next to the CI agent 😄

Test results

  • time docker build -t x9x -f Dockerfile.django-??? . --progress plain --no-cache --target release used for the builds (on an M4 macbook):
  • --platform linux/amd64 added for benchmarking qemu build
platform Debian Time Debian Size Alpine Time Alpine Size
arm64 (native) 1m27 -> 1m23 799MB -> 706MB 1m37 -> 1m32 548MB -> 458MB
amd64 (qemu) 8m49 -> 8m57 764MB -> 669MB 8m26 -> 8m34 533MB -> 442MB

Checklist

This checklist is for your information.

  • Make sure to rebase your PR against the very latest dev.
  • Features/Changes should be submitted against the dev.
  • Bugfixes should be submitted against the bugfix branch.
  • Give a meaningful name to your PR, as it may end up being used in the release notes.
  • Your code is flake8 compliant.
  • Your code is python 3.11 compliant.
  • If this is a new feature and not a bug fix, you've included the proper documentation in the docs at https://github.com/DefectDojo/django-DefectDojo/tree/dev/docs as part of this PR.
  • Model changes must include the necessary migrations in the dojo/db_migrations folder.
  • Add applicable tests to the unit tests.
  • Add the proper label to categorize your PR.

@fopina fopina mentioned this pull request Sep 17, 2025
10 tasks
Copy link
Member

@valentijnscholten valentijnscholten left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I like it.

Copy link
Contributor

@mtesauro mtesauro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved

@Maffooch Maffooch merged commit 9acc3ce into DefectDojo:dev Sep 19, 2025
86 checks passed
@valentijnscholten valentijnscholten added this to the 2.51.0 milestone Sep 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants