-
Notifications
You must be signed in to change notification settings - Fork 17
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
feat: CI job for building Docker binary-only images #122
base: main
Are you sure you want to change the base?
Conversation
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
platforms: linux/amd64,linux/arm64 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a way we can build this architecture-agnostic (rather than explicitly building for arm64/amd64/etc) 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As pointed out here, we can't do it (or at least I don't know how). Is it a problem, though?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was hoping you could build for noarch
architecture or something to indicate that a single manifest can operate on any platform, since the only content of the image (the PHAR) is entirely platform agnostic. Not a major problem, but it creates overhead for something that should otherwise be a single step >.<
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sadly, I believe it's not possible.
566be9b
to
ab320ff
Compare
76493bf
to
7eb5264
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI: this is currently not much usable for local development, but if you plan to define Docker setup for working with the project, you just need to utilise multi-stage build (keep standalone-binary
target for releases and add new one(s) for development).
Similar to composer/docker#250 (more info), this PR introduces a CI process for releasing binary-only images for Pie 🥳!
You can see the result here, there is an image in my fork's Package Registry, built here.
Here's how the image looks like (
dive ghcr.io/wirone/php-pie:latest
):PS: I decided to not verify GPG signature during build because we can trust our own workflow (we copy PHAR file built in previous stage), but also I had some problems with verification (GPG imported correctly, but verification failed). Users may verify the file on their own, if they want, using attached
pie.asc
.