Skip to content

Commit 391fc14

Browse files
authored
docs: simplify installation guide and clarify Windows Docker requirements (#292)
1 parent 8f32cfd commit 391fc14

2 files changed

Lines changed: 28 additions & 61 deletions

File tree

docs/containers.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ The network is expected to have the ICP ledger, the cycles ledger, and the cycle
5050

5151
The gateway port of the network must be bound to a host port (permitted to be 0). Containerized network configurations can have the following fields:
5252

53-
- `port-bindings`: []string, mandatory if an image is specified, in `host:container` format. There must be an entry for the gateway port.
53+
- `port-mapping`: []string, mandatory if an image is specified, in `host:container` format. There must be an entry for the gateway port.
5454
- `rm-on-exit`: bool, default false, deletes the container when the network is stopped
5555
- `args`: []string, appended to the container's entrypoint
5656
- `entrypoint`: []string, entrypoint executable for the container
@@ -62,6 +62,12 @@ The gateway port of the network must be bound to a host port (permitted to be 0)
6262
- `shm-size`: uint, size of `/dev/shm` in bytes.
6363
- `status-dir`: string, default `/app/status`, the status directory mentioned above.
6464

65-
## Windows with WSL2 `dockerd`
65+
## Windows
6666

67-
`icp-cli` will automatically integrate with Docker Desktop's support for WSL2; if unconfigured, it should Just Work. However, if you want to use a manually instantiated `dockerd` in a WSL2 instance serving local TCP, you can set `ICP_CLI_DOCKER_WSL2_DISTRO=<distro>` (as well as `DOCKER_HOST=tcp://<ip>:<port>`). Remote containers are not supported since `icp-cli` makes use of bind mounts; for this purpose you can use 'connected' networks instead of 'managed'.
67+
`icp-cli` automatically integrates with Docker Desktop on Windows (works with both Hyper-V and WSL2 backends). No configuration is needed—it should Just Work.
68+
69+
### Advanced: Manual `dockerd` in WSL2
70+
71+
If you want to use a manually instantiated `dockerd` in a WSL2 instance (instead of Docker Desktop), you can set:
72+
- `ICP_CLI_DOCKER_WSL2_DISTRO=<distro>` — the WSL2 distribution name running dockerd
73+
- `DOCKER_HOST=tcp://<ip>:<port>` — the TCP address where dockerd is listening

docs/guides/installation.md

Lines changed: 19 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
11
# Installation
22

3-
Install icp-cli on macOS, Linux, or Windows (WSL).
3+
Install icp-cli on macOS, Linux, or Windows.
44

5-
## macOS
5+
## macOS / Linux / WSL
6+
7+
**Homebrew (macOS):**
68

79
```bash
810
brew install dfinity/tap/icp-cli
911
```
1012

11-
**Bash/Curl**
13+
To update later: `brew upgrade dfinity/tap/icp-cli`
14+
15+
**Curl installer:**
1216

1317
```bash
1418
# install icp-cli
@@ -18,64 +22,22 @@ curl --proto '=https' --tlsv1.2 -LsSf https://github.com/dfinity/icp-cli/release
1822
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/dfinity/ic-wasm/releases/download/0.9.10/ic-wasm-installer.sh | sh
1923
```
2024

21-
**PowerShell (Windows)**
22-
23-
```ps1
24-
# install icp-cli
25-
powershell -ExecutionPolicy Bypass -c "irm https://github.com/dfinity/icp-cli/releases/download/v0.30.3/cargo-dist-installer.ps1 | iex"
26-
27-
# install ic-wasm which is a dependency for many recipes
28-
powershell -ExecutionPolicy Bypass -c "irm https://github.com/dfinitiy/ic-wasm/releases/download/v0.9.11/ic-wasm-installer.ps1 | iex"
29-
```
30-
31-
**From source:**
32-
33-
Cargo is required as a pre-requisite.
34-
35-
```bash
36-
git clone https://github.com/dfinity/icp-cli.git
37-
cd icp-cli && cargo build --release
38-
export PATH=$(pwd)/target/release:$PATH
39-
```
40-
41-
Verify installation:
42-
43-
```bash
44-
icp --version
45-
```
46-
47-
## Installation Methods
48-
49-
### Homebrew (macOS)
50-
51-
The recommended installation method for macOS:
52-
53-
```bash
54-
brew install dfinity/tap/icp-cli
55-
```
56-
57-
To update later:
58-
59-
```bash
60-
brew upgrade dfinity/tap/icp-cli
61-
```
62-
63-
## Linux / WSL
64-
65-
```bash
66-
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/dfinity/icp-cli/releases/download/v0.1.0-beta.3/icp-cli-installer.sh | sh
67-
```
68-
6925
The installer adds icp-cli to your PATH automatically. Restart your shell or run the `source` command shown by the installer.
7026

7127
## Windows
7228

7329
```ps1
30+
# install icp-cli
7431
powershell -ExecutionPolicy Bypass -c "irm https://github.com/dfinity/icp-cli/releases/download/v0.1.0-beta.3/icp-cli-installer.ps1 | iex"
32+
33+
# install ic-wasm which is a dependency for many recipes
34+
powershell -ExecutionPolicy Bypass -c "irm https://github.com/dfinity/ic-wasm/releases/download/v0.9.11/ic-wasm-installer.ps1 | iex"
7535
```
7636

7737
The installer adds icp-cli to your PATH automatically. Restart your shell (and if it's inside another program, e.g. the VS Code embedded shell, restart that program too).
7838

39+
**Docker requirement:** If you want to run a local test network, you'll need [Docker Desktop](https://docs.docker.com/desktop/setup/install/windows-install/). Docker is only required for local networks—you can build canisters and deploy to mainnet without it.
40+
7941
## Verify Installation
8042

8143
```bash
@@ -99,13 +61,6 @@ npm install -g ic-mops
9961
mops toolchain init
10062
```
10163

102-
## Other dependencies
103-
104-
### Docker/WSL2 (Windows)
105-
106-
On Windows, the local network will be run in a Docker container inside WSL2. It is recommended to install [Docker Desktop](https://www.docker.com/products/docker-desktop/) with WSL2 integration, but a manually run `dockerd` instance is [also supported](docs/containers.md).
107-
108-
Docker is also a dependency for projects that manually configure their network to be container-based.
10964

11065
## Troubleshooting
11166

@@ -119,6 +74,12 @@ export PATH="$HOME/.cargo/bin:$PATH"
11974

12075
Then restart your shell or run `source ~/.bashrc` (or `~/.zshrc`).
12176

77+
**"Cannot connect to Docker" (Windows)**
78+
79+
On Windows, Docker Desktop must be running before starting a local network. Ensure:
80+
- Docker Desktop is installed and running
81+
- For manual `dockerd` setup with WSL2, see [containers.md](../containers.md)
82+
12283
**Network launcher download fails**
12384

12485
The network launcher downloads automatically on first use. If it fails:

0 commit comments

Comments
 (0)