Skip to content

Preliminary updates to CI on the road to building maintainable multiplatform container images #410

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 3, 2025

Conversation

phillipross
Copy link
Contributor

  • Build on both x86 and arm runners
  • Pin version of docker engine to be used for image builds to a specific version
  • Configure Docker Engine on runner to use containerd image store (details here)
  • Use binfmt container to install emulation platforms (details here)
  • Only push x86 container images for now

This PR only modifies CI for now. Detailed change explanations are as follows:

The make-docker-images job matrix now defines a runner-platform variable with definitions for a Ubuntu x86 and Ubuntu arm runner. This added variable results in the job now being run on two separate runners, building images for each platform, but a condition is defined on the subsequent "push" step which intentionally limits only the x86 images being pushed to DockerHub for now and not the arm images.

A step has been added to install a specific version of Docker Engine on the runner and configure it to use the containerd image store which is needed to facilitate multiplatform image handling. It seems the GHA Ubuntu runners already install Docker Engine from Docker's APT repos, but with an older version. In order to keep the CI builds more stable, this PR defines an environment variable specifying the exact version to be installed. The initial value for the variable is the current latest Docker Engine release as of 2024-02-25.

A step has been added to run the "binfmt" container image on the runner so that QEMU can be used to build container images for other platforms. Currently this QEMU functionally is NOT used and has proven to be problematic with the postgis builds.

As stated above, the step which pushes images to DockerHub has been modified to include a condition to only push images built on the x86 runners. This is intended to be temporary until multiplatform composite images are rolled into the CI.

…latform container images

- Build on both x86 and arm runners
- Pin version of docker engine to be used for image builds
- Only push x86 container images for now

Signed-off-by: Phillip Ross <[email protected]>
Copy link
Member

@ImreSamu ImreSamu left a comment

Choose a reason for hiding this comment

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

Thank you for the PR.
&& Sorry for the delay, Accepted.


Notes (optional):
If you commit the PR to master, please make sure that the ARM image doesn't cause any issues.
In theory, there should be no problems, but if there are, a quick fix will be needed.


imho: later, we will need our own Docker Hub testing system so that manifest-related tests are not done in the production repository.
I'm a bit cautious because the bad docker manifest can easily ruin the Docker images.

@phillipross
Copy link
Contributor Author

Right, I actually was going to send you a note in the matrix channel not to merge because I wanted to merge it and watch to make sure it all worked, given the new conditions in the workflow file 😁 If there are issues then I'll wrangle it and get it working again even if it means a full revert. Thanks!

@phillipross phillipross merged commit 7d71b73 into postgis:master Mar 3, 2025
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants