-
Notifications
You must be signed in to change notification settings - Fork 78
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
Add heroku/heroku:24 and heroku/heroku:24-build as multiarch images #245
Conversation
ec74bc0
to
20fad1a
Compare
I wonder if removing our custom user will resolve: |
Some other potential package candidates to drop:
|
Seems like we'd want to generate/check/test both architectures (when possible and feasible). But for multiarch base images it seems we probably shouldn't include The differences are pretty minor, but would it perhaps make sense to generate package lists for both supported architectures (e.g. A rough implementation of a write_package_list implementation that'd achieve this while supporting the current stacks:
Not suggesting we actually use that, just a quick example that'd work without changes to callers of the function :) |
@runesoerensen - Yes, makes sense to me. I added a modified version of your suggestion in b739fbe. |
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.
Thank you for working on this! It's great to see both multi-arch support, plus some simplifications/cleanups of the image hierarchy + contents for the CNB-specific parts.
I didn't review the list of packages, since that will take much longer (this initial review pass took 90 mins as is, and it's not entirely complete even ignoring the packages list), and is something I can do after this merges, since we agreed it was fine to change/remove packages prior to GA.
I think we should keep Definitely okay with dropping |
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.
Did a bit of testing (with and without containerd
enabled, heroku-22 and heroku-24) this afternoon and it seems to be working great.
Looks good to me! But I know @dzuelke is planning to review as well, so probably best he approve it :)
Signed-off-by: Josh W Lewis <josh.lewis@salesforce.com>
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.
Looks good to me!
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.
Amazing, thank you!
Since today is the upstream feature freeze day, it's likely there will be more package churn - so we may want to (a) hold off merging until later in the day/tomorrow, (b) retrigger CI before merging in case there has already been further changes.
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.
bin/build.sh
still has spaces for indentation in a few places, should be tabs throughout the entire file
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.
bin/build.sh
still has spaces for indentation in a few places, should be tabs throughout the entire file
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.
See @edmorley's remaining suggestions re: curl
and jq
error handling etc.
Co-authored-by: Ed Morley <501702+edmorley@users.noreply.github.com>
Co-authored-by: Ed Morley <501702+edmorley@users.noreply.github.com>
I don't see the arm64 build in Docker Hub yet, correct? https://hub.docker.com/r/heroku/heroku/tags |
@joshwlewis It looks like the ARM64 build isn't being uploaded to the eg compare: ...with the upstream |
The above issue has now been resolved by #252 + #253: (Though do bear in mind that Ubuntu 24.04 hasn't even reached beta yet, so the Heroku-24 images are extremely experimental, and we also plan on removing some packages over the coming weeks to reduce image size, so expect breaking changes at any point before Heroku-24 GA.) |
I noticed that after this merged, the CI build/publish times increased from ~5 mins to ~40 mins: I presume this is due to two things:
ie: This is expected/unavoidable for now, until we switch to GitHub Actions' upcoming ARM64 runners and build the architectures in parallel across multiple jobs. |
This PR will make
heroku-24
available as a multi-arch image in Dockerhub. However,heroku-24
is still in development and not recommended for production workloads.heroku-24
will not be made available on the Heroku platform until a later date.General Changes from
heroku-22
heroku/heroku:24
andheroku/heroku:24-build
are multi-arch images, supportinglinux/amd64
andlinux/arm64
Separate run user (heroku / 1001) and build user (heroku-build / 1002) for heightened security posture in CNB environments.Edit: This was reverted in Heroku-24: Use the same user for the run and build images #281.It is now 1001 or 1002 depending on the image, as described above.It is nowheroku
(with ID 1000).*cnb*
variants (likeheroku/heroku:22-cnb-build
) in the heroku-24 line.heroku/heroku:24
andheroku/heroku:24-build
are compatible with Cloud Native Buildpacks.Package changes from
heroku-22
We are dropping some of the less popular packages in an effort to reduce the image size. Significant demand could mean we reintroduce packages prior to release.
syslinux
, which is not available forarm64
. A collection of DOS bootloaders is unlikely to be used on the platform.libgnutlsxx28
, which is not available innoble
. There isn't a clear drop-in replacement. However, it's dependencies are still included via other packages.mercurial
from the-build
variant. Heroku's deployment experience is based on git, and most of the tools in our ecosystem are hosted via git. Even mercurial servers can serve git protocols these days.bzr
/brz
from the-build
variant. For the same reasons mentioned aboutmercurial
.python3-dev
from the-build
variant.ghostscript
(and it's dependencies/recommendslibgs10
,libgs10-dev
, andgsfonts
). Many languages have native PDF library implementations and/or use other tools likewkhtmltopdf
,webkit
,convert
, and/orpdfkit
for their PDF needs.ghostscript
isn't as ubiquitous as it once was, and has seen a number of vulnerabilities in recent years too.language-pack-en
. This generates a locale data for around 20 english variants (likeen_AG UTF-8
,en_NZ.UTF-8 UTF-8
,en_ZW.UTF-8 UTF-8
, etc.).en_US.UTF-8
is now made available vialocale-gen
instead. The defaultlocale
remains unchanged.Build and Publish Changes
Docker Desktop can build, store, and retrieve multi-arch images locally. To do so, either enable the
containerd
image store in Docker Desktop settings and/or enable thedocker-container
driver withdocker buildx create --use
.Linux based
docker
can build multi-arch images as long as thedocker-container
driver is enabled withdocker buildx create --use
. It does not have the ability to store or retrieve multi-arch images locally, though. The only place to store these images is in an image registry. This introduces some challenges to the CI process since it currently verifies packages prior to pushing.Potentially, the ideal CI solution for this is to build architecture specific images on instances with that architecture, then have another process that creates and pushes the multi-arch manifest list afterwards. However, arm64 GitHub actions runners aren't generally available.
Instead, this PR modifies the CI pipeline. When running tests, images are built for amd64 only, and the package list is generated and checked for amd64. Then, when publishing images, multi-arch images are built and pushed to temp tags, then retagged to stable tags once that succeeds.
GUS-W-14658761.
GUS-W-15157866.