Skip to content

Run as Docker Container

grenston edited this page Nov 5, 2020 · 2 revisions

How to execute with docker

  1. Open cmd/terminal and navigate to the path where the tool is cloned.

    cd <path-to-the-repository>

  2. Run the following command to build the tool with docker.

    docker build -t automate-branch-rules .

  3. Run the following command to start the tool.

    docker run -it --name branch-rules automate-branch-rules

  4. Enter the organization name, PAT and Execution type when prompted. If choosing single repository add/remove you will also have to provide Repository Name.

    run-tool-docker

  5. Verify in GitHub whether the rules are added.

Remove container and image

  1. After successful run you can remove the container and image. Even if you want to re-run you will have to remove it or use another image name and container name in docker commands.

  2. Execute the following command to remove the container.

    docker container rm branch-rules

  3. Execute the following command to remove the image.

    docker rmi automate-branch-rules