Skip to content

[docker] Multi-stage Dockerfile - #147

Merged
antonio-leblanc merged 2 commits into
forefireAPI:devfrom
yanissrairi:feature/dockerfile-multistage
May 11, 2026
Merged

antonio-leblanc merged 2 commits into
forefireAPI:devfrom
yanissrairi:feature/dockerfile-multistage

Conversation

@yanissrairi

Copy link
Copy Markdown
Contributor

Closes #144.

This rewrites the Dockerfile as a two-stage build: a builder that compiles
forefire and the Python bindings, and a runtime stage that just copies the
artifacts in. The toolchain (build-essential, cmake, python3-dev, netcdf-dev
headers) no longer ends up in the runtime image.

Numbers I just remeasured on Fedora 43, Docker 29:

master multistage
disk usage on host 1.38 GB 779 MB (-44%)
pull size 360 MB 195 MB (-46%)

tests/runff/ff-run.bash returns EXIT=0 on the multistage image.

I also dropped tools/devops/Dockerfile.base, Dockerfile.multistage,
readme.md and entrypoint.sh since @antonio-leblanc confirmed in #144 that
those were abandoned attempts. Left tools/devops/increment-version.yml
alone, since it looks intentionally paused (moved out of .github/workflows/
in 2c337fa with the message "not needed now"). Happy to handle it in a
separate issue if you'd like.

@antonio-leblanc antonio-leblanc left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM
nice results thanks

@antonio-leblanc
antonio-leblanc merged commit 7f94661 into forefireAPI:dev May 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants