3

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:

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?

Gino Mempin
  • 25,369
  • 29
  • 96
  • 135
Coder123
  • 31
  • 4
  • `FROM registry.heroku.com/app_name/web:latest` this looks very off and is new to me. While logged into the Heroku registry can you build a docker image locally? I doubt it. Pulling the image works I'm not doubting that. That's why building it on Heroku end is failing too. Also the link you posted tell you to push the images to Docker Hub (Registry) and pulling from there. It's not about pulling images from Heroku Registry. You haven't done that. – Tin Nguyen Apr 20 '20 at 14:40
  • 2
    I think the issue that i'm trying to fix were not well explained, so here is the topic: i have a project deployed to heroku, when i make some changes and push them to heroku the build process takes several minutes to be finished especially the dependencies installation from Pipfile.lock because it seems that there is no caching mechanism. So, the question is : are there any ways to pull the latest image from heroku registry and use it as a cache image to minimize the building time ? – Coder123 Apr 20 '20 at 22:51

0 Answers0