Skip to content

Docker Hub images#405

Open
prj- wants to merge 2 commits into
developfrom
release-docker
Open

Docker Hub images#405
prj- wants to merge 2 commits into
developfrom
release-docker

Conversation

@prj-

@prj- prj- commented Jul 19, 2026

Copy link
Copy Markdown
Member

No description provided.

@prj-

prj- commented Jul 19, 2026

Copy link
Copy Markdown
Member Author

@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.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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/Dockerfile that builds FreeFEM from source and provides a runtime image with a basic smoke test.
  • Extend .github/workflows/releases.yml to build/push per-arch images, publish a multi-platform manifest, and attach exported image tarballs to GitHub Releases.
  • Add a .dockerignore to 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.

Comment thread .github/workflows/releases.yml
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Comment on lines +100 to +110
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
include:
- arch: amd64
platform: linux/amd64
runner: ubuntu-24.04
- arch: arm64
platform: linux/arm64
runner: ubuntu-24.04-arm

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I would put this in the set_versions job, in variables like docker_versions and docker_arch.

windows_versions: ${{ needs.set_versions.outputs.windows_versions }}
ubuntu_versions: ${{ needs.set_versions.outputs.ubuntu_versions }}

build_docker:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

If you want to follow the previous structure, you can create instead a get_docker job that uses a callable release_docker.yml workflow with the docker_versions and docker_arch parameters (see comment below). In this workflow you would call the build_docker job.

Comment on lines +248 to +260
| gzip --best \
> "docker-assets/FreeFEM-${VERSION}-docker-linux-${ARCH}.tar.gz"
docker image rm "${IMAGE}"
done

- name: Upload Docker release artifacts
uses: actions/upload-artifact@v7
with:
name: docker-images-${{ needs.set_versions.outputs.ff_version }}
path: ./docker-assets/*
if-no-files-found: error
compression-level: 0
retention-days: 1

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why don't you directly create and upload the tar.gz in the build_docker job?

if-no-files-found: error
retention-days: 1

publish_docker:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Seems ok, might be moved in separate workflow?

Comment thread etc/docker/Dockerfile
&& ./reconfigure

RUN make -j"${MAKE_JOBS}" \
&& make install

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We could remove static libraries to save some space, with somethin like:

&& find /usr/local/lib -name '*.a'  -delete \
&& find /usr/local/lib -name '*.la' -delete

Comment thread etc/docker/Dockerfile
Comment on lines +76 to +82
freeglut3-dev \
g++ \
gcc \
gfortran \
libfftw3-dev \
libhdf5-dev \
libopenblas-dev \

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'd install non -dev versions instead.

Comment thread etc/docker/Dockerfile
@@ -0,0 +1,96 @@
# syntax=docker/dockerfile:1

FROM ubuntu:24.04 AS builder

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We could try debian:bookworm instead, so that debian:bookworm-slim image can be used at runtime and optimize a bit the size of the image.

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.

3 participants