https://github.com/solairen/gh-cli
GitHub CLI inside the docker container.
https://github.com/solairen/gh-cli
cli docker github-cli
Last synced: about 2 months ago
JSON representation
GitHub CLI inside the docker container.
- Host: GitHub
- URL: https://github.com/solairen/gh-cli
- Owner: solairen
- License: mit
- Created: 2021-08-22T18:33:16.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2023-09-13T05:08:53.000Z (over 2 years ago)
- Last Synced: 2023-09-13T13:12:00.594Z (over 2 years ago)
- Topics: cli, docker, github-cli
- Language: Dockerfile
- Homepage:
- Size: 53.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
### About:
* OS: Alpine Linux 3.17.1
This docker container contains:
* [GitHub CLI](https://cli.github.com/)
### Tag version
Check latest container tag [version](https://hub.docker.com/repository/docker/moleszek/ghcli/tags?page=1&ordering=last_updated) and change **** with proper tag version.
### How to build or download:
#### To build docker images from Dockerfile:
* docker build . -t {tagname}
#### Download from Docker repository:
* docker pull moleszek/ghcli:
### To run GHCLI Docker image directly:
Windows:
```PowerShell
docker run --rm -ti -e TOKEN=$env:GHTOKEN -v :/gh -v :/root/.config/gh/ -v :/root/.ssh/ moleszek/ghcli:
```
Linux:
```Bash
docker run --rm -ti -e TOKEN=$GHTOKEN -v :/gh -v :/root/.config/gh/ -v :/root/.ssh/ moleszek/ghcli:
```
#### Important
To run this docker image correctly those things should be made before run:
* TOKEN => GitHub token.
* pathToGitRepository => path to folder where .git is created.
* pathToConfig => path to folder where GitHub CLI config will be stored.
* pathToSSH => path to .ssh keys.
#### Additional info
Set alias to be able to use this docker image as `gh` for example:
* On windows open `$PROFILE`:
```PowerShell
function gh_cli {
docker run --rm -ti -e TOKEN=$env:GHTOKEN -v :/gh -v :/root/.config/gh/ -v :/root/.ssh/ moleszek/ghcli:
Set-Alias -Name gh -Value gh_cli
}
```
Save and restart `$PROFILE`:
```PowerShell
. $PROFILE
```
* On linux open `~/.bashrc`:
```Bash
alias gh="docker run --rm -ti -e TOKEN=$GHTOKEN -v :/gh -v :/root/.config/gh/ -v :/root/.ssh/ moleszek/ghcli:"
```
Save and restart `.bashrc`:
```Bash
. ~/.bashrc
```