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

Feature/image build improvements #44

Open
wants to merge 131 commits into
base: main
Choose a base branch
from

Conversation

bap14
Copy link
Member

@bap14 bap14 commented Mar 3, 2025

@navarr This restructures the PHP image build process. It builds arm64 on arm64 runners and amd64 on amd64 runners. It also parallelizes the different variations of images as much as possible (e.g. run 7.4, 8.x at the same time). It also adds a more dynamic PHP version loading, so when 8.5 drops we won't need to update the builder (unless we stop building 7.4).

In order to keep the "php" workflow from being 10,000 lines long, and because GitHub Actions don't support yaml anchors and merging, I split the workflows into individual yaml files when we were doing the same tasks over and over again.

Finally it adds a container structure testing tool which validates that the built docker image contains the things it should for that particular image (e.g. extensions, configurations, utilities, etc.).

I know it's a large pull request, but there was kind of no way around it. I didn't test this without an environment (with relation to secrets). I can run that test, but wanted to get this PR over to you.

@bap14
Copy link
Member Author

bap14 commented Mar 3, 2025

I wasn't pushing to DockerHub (during testing I hit the API limits for DockerHub), but without that push it took 45 minutes to build everything.

image

It does create a bunch of artifacts, but they're short-lived and each is around less than 500 bytes. So the total storage of artifacts for a single run is somewhere around 120KB of space. Their purpose is to be able to move data between jobs so the built layers the "build" job, can be referenced when creating the final multi-arch manifest in the "push" job.

@bap14
Copy link
Member Author

bap14 commented Mar 5, 2025

@navarr Okay, i made a small adjustment to the main workflow and made the environment optional. I ran it twice (once without Dockerhub and once with) and both times the full process completed successfully. The run took 43 minutes to complete.

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.

1 participant