'Heroku deploy from existing docker image

I'm trying to deploy a GitHub bot on Heroku, using an existing docker image.

The image is already built. What I've done to try to deploy it to Heroku:

$ heroku login
Logging in... done
Logged in as EMAIL
$ heroku container:login
Login Succeeded
$ docker tag IMG_ID registry.heroku.com/APP/web
$ docker push registry.heroku.com/APP/web
The push refers to repository [registry.heroku.com/APP/web]
ABC: Layer already exists 
XYZ: Layer already exists 
...
lastest: digest: sha256:NUMBER size: SIZE
$ heroku container:release registry.heroku.com/APP/web
Expected response to be successful, got 404

And no release is done.

I've based these steps on https://devcenter.heroku.com/articles/container-registry-and-runtime#release-phase and Deploy Existing Docker Image To Heroku, but it doesn't seem to be working for me.

At this point I'm pretty stuck, any help would be appreciated.

EDIT:

Docker pull:

$ docker pull registry.heroku.com/APP/web
Using default tag: latest
latest: Pulling from APP/web
Digest: sha256:NUMBER
Status: Image is up to date for registry.heroku.com/APP/web:latest

Heroku run:

$ heroku run bash --type=web
Running bash on ⬢ APP... up, web.1514 (Free)


Solution 1:[1]

I think your release command is malformed: you shouldn't specify the full image label, just the dyno type.

What works for me is heroku container:release web -a <app>

It seems that you can't specify the image version / tag directly; container:release always takes the latest tag.

Solution 2:[2]

In ruby on Rails yo can write Procfile to especify process types like this:

web: rails s
worker: rake jobs:work 

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1
Solution 2