GithubHelp home page GithubHelp logo

brunodles / alpine-heroku-cli Goto Github PK

View Code? Open in Web Editor NEW

This project forked from wingrunr21/alpine-heroku-cli

0.0 2.0 0.0 30 KB

alpine based Docker image for the Heroku CLI

Dockerfile 100.00%

alpine-heroku-cli's Introduction

Alpine Heroku CLI

This image packages the Heroku CLI inside an Alpine Linux based Docker container. The version will track that of the Heroku CLI.

Usage

The easiest way to use this would be to use your Heroku API key or an OAuth authorization token set as the HEROKU_API_KEY environment variable.

Another method would be to mount your ~/.netrc as a volume on the docker container. This would use your local Heroku login credentials for authentication.

docker run wingrunr21/alpine-heroku-cli version
# heroku-cli/5.6.12-c892d56 (linux-amd64) go1.6.3

# API key/OAuth token method
docker run --rm -e HEROKU_API_KEY="abc-123123123" wingrunr21/alpine-heroku-cli list
# == Collaborated Apps
# app1
# app2
# ...
docker run --rm -v ~/.netrc:/root/.netrc:ro wingrunr21/alpine-heroku-cli list
# == Collaborated Apps
# app1
# app2
# ...

Alias

Another option is to create an alias on ~/.bashrc or ~/.zshrc to map to heroku inside docker.

alias heroku="touch ~/.netrc && docker run --rm -it -v ~/.netrc:/root/.netrc -v $(pwd):/app -w /app brunodles/alpine-heroku-cli"

This alias have one "setup step" to make everything work fine.

  • Create a .netrc file inside user home
  • Run docker command

This docker command will:

  • Remove itself on the end
  • Make a link between host and guest .netrc files. (it's a volume)
  • Make a volume with local folder and app folder inside container

This will ensure you can run Heroku CLI as usual.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.