Skip to content

fix: Move docker builds to native platforms - #22

Merged
clintjedwards merged 1 commit into
masterfrom
cje/fix_docker_builds
Aug 21, 2025
Merged

fix: Move docker builds to native platforms#22
clintjedwards merged 1 commit into
masterfrom
cje/fix_docker_builds

Conversation

@clintjedwards

Copy link
Copy Markdown
Collaborator

The current Docker builds are taking an excessively long time to complete, currently over 6 hours causing GitHub Actions to time out. We believe it's because internally it's using virtualization to build the arm64 version of the container.

To attempt to alleviate this, this PR uses a GitHub Actions matrix to separate the builds into runners on their own native platforms.

The hope is that the lack of needing to virtualize will speed up the overall time.

@clintjedwards

Copy link
Copy Markdown
Collaborator Author

There are two temporary changes here that I will revert once I verify that this actually builds successfully.

  • I added pull requests to master as a trigger
  • I explicitly set push to false

@clintjedwards
clintjedwards force-pushed the cje/fix_docker_builds branch 2 times, most recently from 69cdefe to 32a87fd Compare August 13, 2025 20:41
@clintjedwards

Copy link
Copy Markdown
Collaborator Author

Swapped back to the original settings! If reviewers want to review the logs for the builds they are here: https://github.com/fanout/docker-pushpin/actions/runs/16948393367

@clintjedwards

Copy link
Copy Markdown
Collaborator Author

After testing this we realized that this wouldn't build a single image with a combined manifest for the two cpu architectures, instead it would just push over whatever the first arch was. I misunderstood how Dockerhub handled this. Investigating on how to go back to a single image/manifest build without too much trouble.

@clintjedwards
clintjedwards force-pushed the cje/fix_docker_builds branch from 32a87fd to 0e4b563 Compare August 21, 2025 00:27
@clintjedwards

Copy link
Copy Markdown
Collaborator Author

Okay I finally have what I think is a winning actions file. When a git tag is pushed it produces the following artifacts (note the version values here are an example):

  • latest (multi-arch)
  • 1.42.0 (multi-arch)
  • latest-arm64
  • 1.42.0-arm64
  • latest-amd64
  • 1.42.0-amd64
image

I've tested it here, but I'm not quite sure how to best test it for this context. I can turn off the latest flag, but if we test it in this PR it will create tags with the branch name instead of the version.

Maybe we can merge with latest turned off and then test build. Then if that works well we can update latest to on and re-run the job again?

@deg4uss3r

Copy link
Copy Markdown
Collaborator

What's the issue with testing and latest? Do we automatically pick up latest from somewhere else?

If so merge with CLINT or something and if that looks good, a small PR to replace to latest is a good solution.

@clintjedwards

Copy link
Copy Markdown
Collaborator Author

What's the issue with testing and latest? Do we automatically pick up latest from somewhere else?

If so merge with CLINT or something and if that looks good, a small PR to replace to latest is a good solution.

In the current incarnation of this, if we test and push a latest tag, we might have a bunch of people who are just pulling pushpin:latest that might get a version of latest that does not have one of the architectures(assuming this does not work for some reason). Which would break builds.

But yeah I think merging without latest here first and then turning it on in another small PR is the going recommendation.

@clintjedwards
clintjedwards force-pushed the cje/fix_docker_builds branch from 0e4b563 to 20c6f98 Compare August 21, 2025 19:59
The current Docker builds are taking an excessively long time to complete,
currently over 6 hours causing GitHub Actions to time out. We believe
it's because internally it's using virtualization to build the arm64
version of the container.

To attempt to alleviate this, this PR uses a GitHub Actions matrix to
separate the builds into runners on their own native platforms.

The hope is that the lack of needing to virtualize will speed up the
overall time.
@clintjedwards
clintjedwards force-pushed the cje/fix_docker_builds branch from 20c6f98 to 41a814f Compare August 21, 2025 20:05
@clintjedwards
clintjedwards merged commit 41a814f into master Aug 21, 2025
@clintjedwards
clintjedwards deleted the cje/fix_docker_builds branch August 28, 2025 18:15
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