+
Skip to content
This repository was archived by the owner on Mar 30, 2025. It is now read-only.

solairen/gh-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

About:

  • OS: Alpine Linux 3.17.1

This docker container contains:

Tag version

Check latest container tag version 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:

docker run --rm -ti -e TOKEN=$env:GHTOKEN -v <pathToGitRepository>:/gh -v <pathToConfig>:/root/.config/gh/ -v <pathToSSH>:/root/.ssh/ moleszek/ghcli:<tag>

Linux:

docker run --rm -ti -e TOKEN=$GHTOKEN -v <pathToGitRepository>:/gh -v <pathToConfig>:/root/.config/gh/ -v <pathToSSH>:/root/.ssh/ moleszek/ghcli:<tag>

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:
function gh_cli {
    docker run --rm -ti -e TOKEN=$env:GHTOKEN -v <pathToGitRepository>:/gh -v <pathToConfig>:/root/.config/gh/ -v <pathToSSH>:/root/.ssh/ moleszek/ghcli:<tag>

Set-Alias -Name gh -Value gh_cli
}

Save and restart $PROFILE:

. $PROFILE
  • On linux open ~/.bashrc:
alias gh="docker run --rm -ti -e TOKEN=$GHTOKEN -v <pathToGitRepository>:/gh -v <pathToConfig>:/root/.config/gh/ -v <pathToSSH>:/root/.ssh/ moleszek/ghcli:<tag>"

Save and restart .bashrc:

. ~/.bashrc

About

GitHub CLI inside the docker container

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

Contributors 2

  •  
  •  
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载