v17v3/gh

By v17v3

Updated 20 days ago

Docker Image for gh (GitHub’s command line tool)

Image
Integration & Delivery
Developer Tools

2.9K

GitHub CLI in Docker

This Docker image encapsulates the GitHub CLI (gh) in a lightweight and portable container, enabling developers and DevOps professionals to interact with GitHub repositories and services directly from Docker environments. Whether you're automating workflows, managing repositories, or integrating with CI/CD pipelines, this Dockerized version of gh offers the flexibility and convenience of GitHub's command-line interface without the need for local installation.

Features:

  • Easy to Use: Get started with the GitHub CLI in seconds, without any installation required on your host system.
  • Portable: Run your GitHub workflows from any machine that supports Docker, ensuring consistency across development, testing, and production environments.
  • Customizable: Extend or customize the Docker image to fit your specific needs or workflow requirements.

GitHub Repository: https://github.com/<your-username>/<your-repo-name>

Quick Start

To pull the Docker image and start using the GitHub CLI, run:

docker pull v17v3/gh:latest
docker run -it v17v3/gh:latest

Usage

Basic Usage

You can use the GitHub CLI in a Docker container by running:

docker run -it v17v3/gh:latest <command>

For example, to list your repos:

docker run -it v17v3/gh:latest repo list
Authentication

To authenticate with GitHub using your Dockerized gh CLI:

  1. Generate a personal access token (PAT) from GitHub with the appropriate scopes.
  2. Run the container and pass your PAT:
docker run -it -e GH_TOKEN="<your-personal-access-token>" v17v3/gh:latest

For more detailed instructions, including building the image and contributing, please visit the GitHub repository linked above.

Docker Pull Command

docker pull v17v3/gh