Skip to content
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

Multiarch images #323

Merged
merged 3 commits into from
Sep 10, 2024
Merged

Multiarch images #323

merged 3 commits into from
Sep 10, 2024

Conversation

arnested
Copy link
Member

@arnested arnested commented Sep 6, 2024

Builds in GitHub Actions warned that the SHA's in the Dockerfile referenced AMD version when building the ARM versions.

This pull request changes the PHP images to references a multiarch SHA and thus avoids that complaint.

The increases the build time of the ARM images dramatically! They used to build in 3–4 minutes, but now it takes 35–45 minutes! I have no clue why. The AMD images still build in 3–4 minutes.

To mitigate the long build time, I introduced caching of docker layers (based on https://docs.docker.com/build/ci/github-actions/cache/). A cached rebuild is now down 3–4 seconds.

I also reordered some instructions in the Dockerfile so that we'll be able to reuse the cached layers more often (when updating the Blackfire CLI and the composer CLI) and only suffer the long build time when we update the base PHP images.

The Dockerfile still references AMD image SHA's for the Blackfire CLI, the composer CLI, and the mlocati/php-extension-installer CLI.

Those are updated by @dependabot, and I haven't figured out if we can make Dependabot use the multiarch SHA's.

@arnested arnested force-pushed the poc branch 2 times, most recently from 01ca3e6 to 9fb7a7f Compare September 6, 2024 11:26
@arnested arnested marked this pull request as ready for review September 6, 2024 11:26
@arnested arnested changed the title Testing Multiarch images Sep 6, 2024
@arnested arnested requested a review from xendk September 6, 2024 12:39
@arnested
Copy link
Member Author

arnested commented Sep 7, 2024

We can probably lower the ARM build time by creating an ARM-based runner: https://github.blog/news-insights/product-news/arm64-on-github-actions-powering-faster-more-efficient-build-systems/

@arnested arnested merged commit f243a11 into main Sep 10, 2024
14 checks passed
@arnested arnested deleted the poc branch September 10, 2024 10:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants