Skip to content

Commit 97c1b30

Browse files
committed
Add install script
1 parent 495d923 commit 97c1b30

File tree

4 files changed

+1295
-3
lines changed

4 files changed

+1295
-3
lines changed

.github/workflows/dev-containers.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,21 @@ jobs:
120120
FEATURES_TEST__AZURE_REGISTRY_SCOPED_CREDENTIAL: ${{ secrets.FEATURES_TEST__AZURE_REGISTRY_SCOPED_CREDENTIAL }}
121121

122122

123+
install-script:
124+
name: Install Script
125+
strategy:
126+
fail-fast: false
127+
matrix:
128+
os: [ubuntu-latest, macos-latest]
129+
runs-on: ${{ matrix.os }}
130+
steps:
131+
- uses: actions/checkout@v6
132+
- name: Run install.sh tests
133+
run: sh scripts/install.test.sh
134+
123135
tests:
124136
name: Tests
125-
needs: [tests-matrix, features-registry-compatibility]
137+
needs: [tests-matrix, features-registry-compatibility, install-script]
126138
runs-on: ubuntu-latest
127139
steps:
128140
- name: Done

README.md

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,42 @@ This CLI is in active development. Current status:
2222

2323
## Try it out
2424

25-
We'd love for you to try out the dev container CLI and let us know what you think. You can quickly try it out in just a few simple steps, either by installing its npm package or building the CLI repo from sources (see "[Build from sources](#build-from-sources)").
25+
We'd love for you to try out the dev container CLI and let us know what you think. You can quickly try it out in just a few simple steps, either by using the install script, installing its npm package, or building the CLI repo from sources (see "[Build from sources](#build-from-sources)").
2626

27-
To install the npm package you will need Python and C/C++ installed to build one of the dependencies (see, e.g., [here](https://github.com/microsoft/vscode/wiki/How-to-Contribute) for instructions).
27+
### Install script
28+
29+
You can install the CLI with a standalone script that downloads a bundled Node.js runtime, so no pre-installed Node.js is required. It works on Linux and macOS (x64 and arm64):
30+
31+
```bash
32+
curl -fsSL https://raw.githubusercontent.com/devcontainers/cli/main/scripts/install.sh | sh
33+
```
34+
35+
Then add the install location to your PATH:
36+
37+
```bash
38+
export PATH="$HOME/.devcontainers/bin:$PATH"
39+
```
40+
41+
You can also specify a version, a custom install directory, or update/uninstall an existing installation:
42+
43+
```bash
44+
# Install a specific version
45+
sh install.sh --version 0.82.0
46+
47+
# Install to a custom directory
48+
sh install.sh --prefix ~/.local/devcontainers
49+
50+
# Update to latest
51+
sh install.sh --update
52+
53+
# Uninstall
54+
sh install.sh --uninstall
55+
```
2856

2957
### npm install
3058

59+
To install the npm package you will need Python and C/C++ installed to build one of the dependencies (see, e.g., [here](https://github.com/microsoft/vscode/wiki/How-to-Contribute) for instructions).
60+
3161
```bash
3262
npm install -g @devcontainers/cli
3363
```

0 commit comments

Comments
 (0)