Docker Hub images - #405
Conversation
|
@simonlegrand, the structure between Docker and your stuff is not matching precisely, see https://github.com/FreeFem/FreeFem-sources/actions/runs/29691285093, so let me know what adjustments should be made, please. |
There was a problem hiding this comment.
Pull request overview
Adds first-class Docker image build/publish support to the release workflow, including a multi-stage Dockerfile and release asset exports, so FreeFEM can be distributed via Docker Hub and GitHub Releases.
Changes:
- Add a multi-stage
etc/docker/Dockerfilethat builds FreeFEM from source and provides a runtime image with a basic smoke test. - Extend
.github/workflows/releases.ymlto build/push per-arch images, publish a multi-platform manifest, and attach exported image tarballs to GitHub Releases. - Add a
.dockerignoreto reduce Docker build context size and avoid copying build artifacts into image builds.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
etc/docker/Dockerfile |
Defines builder/runtime stages to compile and run FreeFEM inside an Ubuntu 24.04 container. |
.github/workflows/releases.yml |
Adds Docker build + multi-arch publish jobs and includes Docker image tarballs in release assets. |
.dockerignore |
Excludes common build outputs and large 3rd-party directories from Docker build context. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
3e2c4f6 to
cde3709
Compare
simonlegrand
left a comment
There was a problem hiding this comment.
Nice! Thanks for the structure mods. I don't understand the failure, could we try to run the whole pipeline again to see if it was only a "one-off" github problem?
|
Are you done with the changes, @simonlegrand? Sorry, I lost track of this one. |
|
It seems ok to me. The CI kept failing randomly when downloading freeyams (https://github.com/FreeFem/FreeFem-sources/actions/runs/30818261818/job/91760697332), it's probably a Github problem but still it's a bit annoying not to have all the green lights, and packages :). Do you want to give it a last try? |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
Suppressed comments (4)
.github/workflows/release_docker.yml:89
- The uploaded artifact name uses
matrix.version, but the job matrix doesn't define aversionkey. This will produce confusing artifact names (or fail expression evaluation depending on runner) and makes the artifact hard to locate.
uses: actions/upload-artifact@v7
with:
name: docker-image-${{ matrix.version }}-${{ matrix.arch }}
path: ./docker-assets/*
.github/workflows/release_docker.yml:106
- The digest artifact name also uses
matrix.version, but the matrix doesn't define it. This can break the downstreamdownload-artifactstep (patterning / expected digests) and makes digests ambiguous across releases.
uses: actions/upload-artifact@v7
with:
name: docker-digest-${{ matrix.version }}-${{ matrix.arch }}
path: ${{ runner.temp }}/digests/*
.github/workflows/releases.yml:83
actions/download-artifact'spatterninput expects a glob; the extglob-style negation pattern!(docker-digest-*|install_tree*)is not a standard glob and may result in downloading no artifacts (breaking the release). Consider downloading all artifacts and relying on the release uploadfiles:globs to select what is published.
uses: actions/download-artifact@v4
with:
path: ./release-assets
pattern: "!(docker-digest-*|install_tree*)"
merge-multiple: true
.github/workflows/release_docker.yml:65
matrix.versionis referenced in the Buildx cache scope, but the matrix only definesarch, somatrix.versionwill be empty/undefined and caching will not work as intended (and may collide across builds). Use the workflow inputrelease_version(orgithub.ref_name) instead.
This issue also appears in the following locations of the same file:
- line 86
- line 103
cache-from: type=gha,scope=docker-${{ matrix.version }}-${{ matrix.arch }}
cache-to: type=gha,scope=docker-${{ matrix.version }}-${{ matrix.arch }},mode=max
provenance: mode=max
|
Well, the issue is that the code is broken, so we can’t merge it as is. |
|
Why are there now so many unneeded assets being downloaded https://github.com/FreeFem/FreeFem-sources/actions/runs/31295773341/job/93238864712? I did not go through all your previous changes, @simonlegrand, but could you please have a look and go back to the initial behavior of the PR (modulo your changes to the workflow)? |
|
Sure, I'll try to do that by the end of the week. |
|
Thanks, take your time. |
- Fix download filter pattern
- Remove ${{ matrix.version }}
|
Those network problems are very annoying and seem to only happen with Ubuntu images. I won't push the tag to trigger the release workflow today, there might be some sort of quota or I don't know what that has already been reached. I'll be on vacation next week so feel free to push it, and when I'll be back I'll try to configure local ubuntu runners on Inria CI platform. |
No description provided.