Workaround for Docker push error "405 Method Not Allowed" using BuildKit 0.11

Issue

Docker pushes from GitHub Actions using https://github.com/docker/build-push-action are failing due to a recent change in the underlying BuildKit 0.11 enabling "provenance" by default.

Resolution

The workaround for this is to configure the failing GitHub Action step to use provenance: false , for example:

      - name: Build and push
        uses: docker/build-push-action@v3
        with:
          push: true
          tags: registry.heroku.com/<app_name>/web
          provenance: false

This provenance setting applies to any customers using BuildKit 0.11, which we only know of coming from GitHub Actions at this time. Provenance attestation can also be disabled by setting BUILDX_NO_DEFAULT_ATTESTATIONS to 1.

This issue can also occur if the Use containerd for pulling and storing images option is enabled when using Docker Desktop. We do not support "containerd" and turning it off will resolve the "405 method not allowed" error.

Ask on Stack Overflow

Engage with a community of passionate experts to get the answers you need

Ask on Stack Overflow

Heroku Support

Create a support ticket and our support experts will get back to you

Contact Heroku Support