I'm working to deploy a project to Heroku using the container registry, but right now, it seems that Heroku rebuilds from scratch which is a time-wasting.
So, after studying, I found these related posts:
- https://stackoverflow.com/a/58204409/3944086
- Can I use Heroku registry as a base image for review app service?
I created a Dockerfile.heroku with this code:
FROM registry.heroku.com/app_name/image_name:latest
and modified heroku.yml as follow:
build:
docker:
web: Dockerfile.heroku
But when I pushed it to Heroku I got this error from Heroku build log:
=== Fetching app code
=== Building release (Dockerfile.heroku)
Sending build context to Docker daemon 168.4kBStep 1/1 : FROM registry.heroku.com/app_name/web:latest
Get https://registry.heroku.com/v2/app_name/web/manifests/latest: no basic auth credentials
Locally, I've logged in Heroku registry and I can pull the image.
How can I fix this issue?