(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"
Many thanks to @mhart for his alpine-node image, which made this one possible. Or much simpler, anyway.
Content type
Image
Digest
Size
51 MB
Last updated
about 6 years ago
docker pull phlummox/heroku-cli