Skip to content

Add Dockerfile and workflow to publish image to GHCR - #499

Merged
smoia merged 7 commits into
physiopy:masterfrom
bpinsard:docker-image
Nov 24, 2026
Merged

smoia merged 7 commits into
physiopy:masterfrom
bpinsard:docker-image

Conversation

@bpinsard

Copy link
Copy Markdown
Contributor

Proposed Changes

Multi-stage Dockerfile installing phys2bids with the acq and mat extras into a venv, running as a non-root user with the CLI as entrypoint. A GitHub Actions workflow builds multi-arch images and pushes them to ghcr.io on master pushes, tags and manual runs; pull requests build without pushing.

The idea would be to then add this container to https://github.com/ReproNim/containers @yarikoptic .

Change Type

  • bugfix (+0.0.1)
  • minor (+0.1.0)
  • major (+1.0.0)
  • refactoring (no version update)
  • test (no version update)
  • infrastructure (no version update)
  • documentation (no version update)
  • other

Checklist before review

  • I added everything I wanted to add to this PR.
  • [Code or tests only] I wrote/updated the necessary docstrings.
  • [Code or tests only] I ran and passed tests locally.
  • [Documentation only] I built the docs locally.
  • My contribution is harmonious with the rest of the code: I'm not introducing repetitions.
  • My code respects the adopted style, especially linting conventions.
  • The title of this PR is explanatory on its own, enough to be understood as part of a changelog.
  • I added or indicated the right labels.
  • I added information regarding the timeline of completion for this PR.
  • Please, comment on my PR while it's a draft and give me feedback on the development!

Multi-stage Dockerfile installing phys2bids with the acq and mat
extras into a venv, running as a non-root user with the CLI as
entrypoint. A GitHub Actions workflow builds multi-arch images and
pushes them to ghcr.io on master pushes, tags and manual runs;
pull requests build without pushing.

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added the Internal Changes affect the internal API. It doesn't increase the version, but produces a changelog label Nov 24, 2026

@smoia smoia left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you @bpinsard ! The docker addition is appreciated.

The only question I have is whether a trigger is needed on every push to master - our CD policy is set to release at every functional change, so anything that you wouldn't catch with a release is actually in folders that are listed in .dockerignore.

As for PRs to master: do you need to build the dockerfile? Is it for testing purposes?

I'll promote this PR to trigger a minor release, so it will start building from now on.

If you could add a (LLM'd) line to the readme to state there's a docker recipe (and where to find it) that is feature-rich but does not support spike2, that'd be awesome.

Comment thread .github/workflows/docker-publish.yml Resolved
Comment thread .github/workflows/docker-publish.yml Resolved
Comment thread .github/workflows/docker-publish.yml Resolved
Comment thread .dockerignore Resolved
bpinsard and others added 5 commits November 24, 2026 12:43
Co-authored-by: Stefano Moia <s.moia.research@gmail.com>
Co-authored-by: Stefano Moia <s.moia.research@gmail.com>
Co-authored-by: Stefano Moia <s.moia.research@gmail.com>
@github-actions github-actions Bot added the Documentation This issue or PR is about the documentation label Nov 24, 2026
@bpinsard
bpinsard requested a review from smoia November 24, 2026 18:03

@smoia smoia left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM!!! Thank you @bpinsard!

@smoia smoia added the Minormod This PR generally closes an `Enhancement` issue. It increments the minor version (0.+1.0) label Nov 24, 2026
@smoia

smoia commented Nov 24, 2026

Copy link
Copy Markdown
Member

@all-contributors add @bpinsard for infra, platform

@allcontributors

Copy link
Copy Markdown
Contributor

@smoia

I've put up a pull request to add @bpinsard! 🎉

@smoia
smoia merged commit 6424e7f into physiopy:master Nov 24, 2026
9 checks passed
@smoia

smoia commented Nov 24, 2026

Copy link
Copy Markdown
Member

🚀 PR was released in 2.12.0 🚀

@smoia smoia added the released This issue/pull request has been released. label Nov 24, 2026
@smoia

smoia commented Nov 24, 2026

Copy link
Copy Markdown
Member

Running here

@bpinsard

Copy link
Copy Markdown
Contributor Author

wow! thanks for the super-responsivness.
I think that at the first push of the container to ghcr, the image is set as private and you have to set it public only that first time.
I cannot see it on the org as I am not a member, but you should be able to change the visibility following that link ghcr.io/physiopy/phys2bids:latest or go in the org packages.

@smoia

smoia commented Nov 25, 2026

Copy link
Copy Markdown
Member

How about now?

@yarikoptic

Copy link
Copy Markdown
Contributor

great to see you both on top of it. I will I guess make my claude look into

;)

@bpinsard

Copy link
Copy Markdown
Contributor Author

thanks @smoia , all good now.
Thanks @yarikoptic, I was under the impression that just prefixing with ghcr.io/ would work, but apparently no.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Documentation This issue or PR is about the documentation Internal Changes affect the internal API. It doesn't increase the version, but produces a changelog Minormod This PR generally closes an `Enhancement` issue. It increments the minor version (0.+1.0) released This issue/pull request has been released.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants