Fix Heroku container push failing with "unsupported" media type#57
Open
hananasen wants to merge 1 commit into
Open
Fix Heroku container push failing with "unsupported" media type#57hananasen wants to merge 1 commit into
hananasen wants to merge 1 commit into
Conversation
BuildKit v0.31.0 changed the image exporter to default to OCI media types for all pushes (previously only when attestations/annotations were present). Heroku's container registry only supports the legacy Docker v2 schema2 manifest format, so pushes started failing with: ERROR: failed to push registry.heroku.com/<app>/<target>: unsupported Explicitly set oci-mediatypes=false via --output to keep pushing the legacy format regardless of the BuildKit version pulled by the floating moby/buildkit:buildx-stable-1 tag.
There was a problem hiding this comment.
Pull request overview
Updates the reusable Heroku container deployment workflow to avoid BuildKit’s newer default OCI media types when pushing images, restoring compatibility with Heroku’s container registry which expects legacy Docker v2 schema2 manifests.
Changes:
- Switches from
--tag ... --pushto an explicit--output ... oci-mediatypes=falseto force legacy Docker media types on push.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| docker buildx build \ | ||
| --target "$target" \ | ||
| --tag "registry.heroku.com/$APP/$target" \ | ||
| --output "type=image,name=registry.heroku.com/$APP/$target,push=true,oci-mediatypes=false" \ |
hananasen
added a commit
that referenced
this pull request
Jul 21, 2026
Temporary branch to confirm the "unsupported" Heroku push failure is caused by BuildKit v0.31.0's new oci-mediatypes=true default, by pinning the builder back to the last known-good version. Not intended to be deployed or merged - see PR #57 for the actual fix.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
heroku-container.ymldeploys started failing withfailed to push registry.heroku.com/<app>/<target>: unsupported.moby/buildkit:buildx-stable-1is a floating tag, and the builder silently picked up BuildKit v0.31.2 between two deploys ofawslimitchecker(last success on BuildKit v0.30.0).--tag ... --pushwith an explicit--output type=image,...,oci-mediatypes=falseso the pushed manifest stays in the legacy format Heroku supports, regardless of which BuildKit patch version gets pulled.Test plan
awslimitchecker's next Heroku deploy (currently failing onmain, see run https://github.com/84codes/awslimitchecker/actions/runs/29805063317) pushes and releases successfully.