Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add instructions for how to run via Docker when someone asks for it #186

Closed
sorenlouv opened this issue Apr 25, 2020 · 0 comments
Closed

Comments

@sorenlouv
Copy link
Owner

sorenlouv commented Apr 25, 2020

Removed the Docker section from the readme because no-one seems to use it


Run via Docker

If you don't have Node.js or git installed locally, you can run backport via Docker.

Click to expand The easiest way is to add the following snippet to your bash profile:
backport() {
    BACKPORT_CONFIG_DIR=~/.backport
    GIT_CONFIG_FILE=~/.gitconfig

    docker run -it --rm -v $(pwd):/app:ro -v $BACKPORT_CONFIG_DIR:/root/.backport -v $GIT_CONFIG_FILE:/etc/gitconfig sqren/backport "$@"
}

Where:

  • BACKPORT_CONFIG_DIR: This can be ANY empty folder on your local machine. Upon running the docker container for the first time, a config.json will be created automatically. This must be filled out with username and accessToken or these must be passed as CLI arguments: backport --username <username> --accessToken <accessToken>
  • GIT_CONFIG_FILE: Must point to a local .gitconfig file that contains the user's name and email.

You can now use backport as if it was installed on the host machine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant