Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Deploy Existing Docker Image To Heroku

Tags:

heroku

I am unable to deploy an existing docker image to Heroku.

Image

docker run -it --name xp-home enonic/xp-home
docker run -d -p 8080:8080 --volumes-from xp-home --name xp-app enonic/xp-app

The steps I took to do it.

heroku login
sudo heroku container:login
sudo docker tag dpd-image registry.heroku.com/hidden-mountain-63983/web
sudo docker push registry.heroku.com/hidden-mountain-63983/web
heroku open -a hidden-mountain-63983

What Am I doing wrong here?

Thank you in advance

like image 627
KuJiM Avatar asked Nov 05 '17 23:11

KuJiM


People also ask

How to deploy a docker app to Heroku?

Heroku provides two ways for you to deploy your app with Docker: 1 Container Registry allows you to deploy pre-built Docker images to Heroku 2 Build your Docker images with heroku.yml for deployment to Heroku More ...

How do I add images to my Heroku application?

Providing you’re already logged into Heroku (via heroku login), you’ll then need to tag and push the image to your Heroku application (let’s call it my-heroku-app):

How do I deploy my Docker project to production?

Develop locally and then deploy the same Docker images to production. Deploy with confidence knowing that code that works on your local machine will also run the same in production.

How to build and run Docker image from local port?

To build Docker image: The following command passes in the port argument and the image name is tmp_image, docker build --no-cache --build-arg port=8060 -t tmp_image . To run Docker image: The following command maps port of Docker image to local port so the web application can be viewed locally, docker run --rm -p 8060:8060 tmp_image


Video Answer


1 Answers

I'll answer this for others that might have the same question.

As per the Heroku Container Registry & Runtime (Docker Deploys) documentation, you need to release the image. In your case

heroku container:release registry.heroku.com/hidden-mountain-63983/web
like image 109
naddison Avatar answered Sep 23 '22 16:09

naddison