Skip to content

Instantly share code, notes, and snippets.

@tmuguet
Created April 13, 2021 15:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tmuguet/8c345c9bda6fbc2517465f6b07164c63 to your computer and use it in GitHub Desktop.
Save tmuguet/8c345c9bda6fbc2517465f6b07164c63 to your computer and use it in GitHub Desktop.
Deploy an existing Docker image to Heroku
#!/bin/bash
# Requires docker CLI and heroku CLI
# Specify here the docker image you want to deploy from Docker registry
docker_image=damoeb/rss-proxy
# Specify here the name of your Heroku app
heroku_app=my-heroku-app
docker pull $docker_image
id=`docker images | grep $docker_image | awk '{print $3}'`
docker tag $id registry.heroku.com/$heroku_app/web
docker push registry.heroku.com/$heroku_app/web
heroku container:release web --app=$heroku_app
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment