Sign inSign up

phlummox/heroku-cli

By phlummox

Updated about 6 years ago

heroku cli in a container

Image
0

343

phlummox/heroku-cli repository overview

use the Heroku cli without having to install the tool yourself

(Heroku want you to install it as root, and to use a custom Node.js installation, AND remove your existing one.)

Step 1: create a vol with your authentication details in it

docker -D run -it --name heroku-config phlummox/heroku-cli:0.1 heroku login

(don't use --rm cos auths persist in the container.)

Then, as long as that volume heroku-config still exists, we can do

Step 2: run a CLI command

docker run --rm -ti --volumes-from heroku-config \
  -v $PWD:/opt/work --workdir /opt/work phlummox/heroku-cli:0.1 heroku --version

(Trick shamelessly stolen from https://hub.docker.com/r/google/cloud-sdk/.)

Or, to make things more convenient:

alias heroku="docker run --rm -ti --volumes-from heroku-config \
  -v $PWD:/opt/work --workdir /opt/work phlummox/heroku-cli:0.1 heroku"

credits

Many thanks to @mhart for his alpine-node image, which made this one possible. Or much simpler, anyway.

GitHub repo

https://github.com/phlummox-dev/docker-heroku-cli

Tag summary

Content type

Image

Digest

Size

51 MB

Last updated

about 6 years ago

docker pull phlummox/heroku-cli