Skip to content

feat: optimize docker image#960

Merged
TimKnight01 merged 6 commits intov5from
tweak-docker-image
Feb 16, 2026
Merged

feat: optimize docker image#960
TimKnight01 merged 6 commits intov5from
tweak-docker-image

Conversation

@gdubicki
Copy link
Copy Markdown
Member

But I have tiny doubts about whether the created image works. 😅 I mean: the app definitely runs, but I wonder if something will not fail when actually using some of its features.

@gdubicki gdubicki temporarily deployed to Integrate Pull Request February 16, 2025 17:01 — with GitHub Actions Inactive
@gdubicki gdubicki temporarily deployed to Integrate Pull Request February 16, 2025 17:01 — with GitHub Actions Inactive
@codecov
Copy link
Copy Markdown

codecov bot commented Feb 16, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.00%. Comparing base (fa75df1) to head (c460483).
⚠️ Report is 1 commits behind head on v5.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##               v5     #960   +/-   ##
=======================================
  Coverage   87.00%   87.00%           
=======================================
  Files          73       73           
  Lines        3802     3802           
=======================================
  Hits         3308     3308           
  Misses        494      494           
Flag Coverage Δ
integration 84.85% <ø> (ø)
unittests 37.45% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@gdubicki gdubicki had a problem deploying to Integrate Pull Request February 17, 2025 12:37 — with GitHub Actions Failure
@gdubicki gdubicki had a problem deploying to Integrate Pull Request February 17, 2025 12:37 — with GitHub Actions Failure
Copy link
Copy Markdown
Collaborator

@amimas amimas left a comment

Choose a reason for hiding this comment

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

Haven't tried this out myself yet. Left a few comments to consider.

@TimKnight01 TimKnight01 changed the base branch from main to v5 September 18, 2025 08:07
@TimKnight01 TimKnight01 added the 5.x release Candidate for potential v5 release label Sep 18, 2025
@TimKnight01
Copy link
Copy Markdown
Collaborator

Shall we target v5 for this @amimas @gdubicki - since we're doing Release-Candidates for that right now as we have other large Breaking Changes to test

gdubicki and others added 6 commits February 14, 2026 19:44
(if you would ever do this) thanks to not adding to it
any files that are not really needed, but may exist on
a development machine
thanks to not creating pip cache (really)
and not installing seemingly unneeded APK packages
The change also updates dockerignore file ignoring more files from build context
@amimas amimas force-pushed the tweak-docker-image branch from 217e58a to c460483 Compare February 15, 2026 21:52
@amimas amimas temporarily deployed to Integrate Pull Request February 15, 2026 21:53 — with GitHub Actions Inactive
@amimas amimas temporarily deployed to Integrate Pull Request February 15, 2026 21:53 — with GitHub Actions Inactive
@amimas amimas marked this pull request as ready for review February 15, 2026 21:58
@amimas
Copy link
Copy Markdown
Collaborator

amimas commented Feb 15, 2026

@gdubicki @TimKnight01 - Picked this up and rebased and pushed an update to it. My update mainly introduces multi-stage builds. Here's what image size looks like with various versions.

REPOSITORY                      TAG                                            IMAGE ID       CREATED          SIZE
localhost/gitlabform            optimized-multi-stage                          7ebf4d5297b3   16 hours ago     68.5MB
localhost/gitlabform            optimized                                      9bbf10d15f97   19 hours ago     77.1MB
ghcr.io/gitlabform/gitlabform   4.8.0                                          2c707b9ff8b0   3 days ago       88.5MB

Here you can see our current released version (v4.8.0) image size is 88.5MB. Original update from this PR reduced it down to 77.1MB. With the multi-stage docker build, it can come down to 68.5MB.

Let me know if you see any issues or concerns. Otherwise, let's get this in for v5 release.

@amimas amimas changed the title Optimize Docker image feat: optimize docker image Feb 15, 2026
@TimKnight01
Copy link
Copy Markdown
Collaborator

@amimas looks good - I'll merge into V5 and do a test of v5 against a Gitlab repo somewhere

@TimKnight01 TimKnight01 merged commit d722840 into v5 Feb 16, 2026
23 checks passed
@TimKnight01 TimKnight01 deleted the tweak-docker-image branch February 16, 2026 10:26
TimKnight01 pushed a commit that referenced this pull request Feb 16, 2026
* build: faster building and smaller image locally

(if you would ever do this) thanks to not adding to it
any files that are not really needed, but may exist on
a development machine

* build: ~10MB (~11%) smaller image (numbers for ARM64)

thanks to not creating pip cache (really)
and not installing seemingly unneeded APK packages

* build: we only need types packages for development

* style: re-arrange dev dependencies in alphabetical order

* fix: restore copy command so that docker build works

* feat: use multi-stage dockerfile to reduce image size

The change also updates dockerignore file ignoring more files from build context

---------

Co-authored-by: amimas <aver.mimas@gmail.com>
TimKnight01 pushed a commit that referenced this pull request Feb 16, 2026
* build: faster building and smaller image locally

(if you would ever do this) thanks to not adding to it
any files that are not really needed, but may exist on
a development machine

* build: ~10MB (~11%) smaller image (numbers for ARM64)

thanks to not creating pip cache (really)
and not installing seemingly unneeded APK packages

* build: we only need types packages for development

* style: re-arrange dev dependencies in alphabetical order

* fix: restore copy command so that docker build works

* feat: use multi-stage dockerfile to reduce image size

The change also updates dockerignore file ignoring more files from build context

---------

Co-authored-by: amimas <aver.mimas@gmail.com>
TimKnight01 pushed a commit that referenced this pull request Feb 16, 2026
* build: faster building and smaller image locally

(if you would ever do this) thanks to not adding to it
any files that are not really needed, but may exist on
a development machine

* build: ~10MB (~11%) smaller image (numbers for ARM64)

thanks to not creating pip cache (really)
and not installing seemingly unneeded APK packages

* build: we only need types packages for development

* style: re-arrange dev dependencies in alphabetical order

* fix: restore copy command so that docker build works

* feat: use multi-stage dockerfile to reduce image size

The change also updates dockerignore file ignoring more files from build context

---------

Co-authored-by: amimas <aver.mimas@gmail.com>
TimKnight01 pushed a commit that referenced this pull request Mar 12, 2026
* build: faster building and smaller image locally

(if you would ever do this) thanks to not adding to it
any files that are not really needed, but may exist on
a development machine

* build: ~10MB (~11%) smaller image (numbers for ARM64)

thanks to not creating pip cache (really)
and not installing seemingly unneeded APK packages

* build: we only need types packages for development

* style: re-arrange dev dependencies in alphabetical order

* fix: restore copy command so that docker build works

* feat: use multi-stage dockerfile to reduce image size

The change also updates dockerignore file ignoring more files from build context

---------

Co-authored-by: amimas <aver.mimas@gmail.com>
amimas added a commit that referenced this pull request Mar 13, 2026
* build: faster building and smaller image locally

(if you would ever do this) thanks to not adding to it
any files that are not really needed, but may exist on
a development machine

* build: ~10MB (~11%) smaller image (numbers for ARM64)

thanks to not creating pip cache (really)
and not installing seemingly unneeded APK packages

* build: we only need types packages for development

* style: re-arrange dev dependencies in alphabetical order

* fix: restore copy command so that docker build works

* feat: use multi-stage dockerfile to reduce image size

The change also updates dockerignore file ignoring more files from build context

---------

Co-authored-by: amimas <aver.mimas@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

5.x release Candidate for potential v5 release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants