Skip to content
This repository has been archived by the owner on Nov 30, 2023. It is now read-only.

Latest commit

 

History

History
60 lines (38 loc) · 1.85 KB

github-cli.md

File metadata and controls

60 lines (38 loc) · 1.85 KB

IMPORTANT NOTE: We're starting to migrate contents of this repo to the devcontainers org, as part of the work on the open dev container specification.

We've currently migrated the github-cli Feature to devcontainers/features/src/github-cli.

For more details, you can review the announcement issue.

GitHub CLI Install Script

Installs the GitHub CLI. Auto-detects latest version and installs needed dependencies.

Script status: Stable

OS support: Debian 9+, Ubuntu 18.04+, and downstream distros.

Maintainer: The VS Code and GitHub Codespaces teams

Syntax

./github-debian.sh [Version]

Or as a feature:

"features": {
    "github-cli": "latest"
}
Argument Feature option Default Description
Version version latest Version of GitHub CLI to install. Use latest to install the latest released version. Partial version numbers are allowed.

Usage

Feature use

To install these capabilities in your primary dev container, reference it in devcontainer.json as follows:

"features": {
    "github-cli": "latest"
}

If you have already built your development container, run the Rebuild Container command from the command palette (Ctrl/Cmd + Shift + P or F1) to pick up the change.

Script use

  1. Add github-debian.sh to .devcontainer/library-scripts

  2. Add the following to your .devcontainer/Dockerfile:

    COPY library-scripts/github-debian.sh /tmp/library-scripts/
    RUN apt-get update && bash /tmp/library-scripts/github-debian.sh

That's it!