From 408e67e5d2558135444bd6e07e55292a4c1bf7cd Mon Sep 17 00:00:00 2001 From: Anthony Nandaa Date: Mon, 20 Mar 2023 07:21:44 +0300 Subject: [PATCH] fix(docs): update installation steps for win and linux --- README.md | 38 ++++++++++++++++++++++++++++---------- 1 file changed, 28 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 70377760f8..932d879814 100644 --- a/README.md +++ b/README.md @@ -134,16 +134,20 @@ In addition to containerd, the following components should be installed: These dependencies are included in `nerdctl-full---.tar.gz`, but not included in `nerdctl---.tar.gz`. -### Brew +### Linux -On Linux systems you can install nerdctl via [brew](https://brew.sh): +Download the `nerdctl---.tar.gz` archive from https://github.com/containerd/nerdctl/releases,verify its sha256sum, and extract it under `/usr/local/bin`: ```bash -brew install nerdctl +$ version="1.2.1" # update to your version of choice +$ curl -L https://github.com/containerd/nerdctl/releases/download/v$version/nerdctl-$version-linux-amd64.tar.gz +$ sudo tar Cxzvf /usr/local/bin nerdctl-$version-linux-amd64.tar.gz +nerdctl +containerd-rootless-setuptool.sh +containerd-rootless.sh +$ nerdctl --version ``` -This is currently not supported for macOS. The section below shows how to install on macOS using brew. - ### macOS [Lima](https://github.com/lima-vm/lima) project provides Linux virtual machines for macOS, with built-in integration for nerdctl. @@ -154,14 +158,28 @@ $ limactl start $ lima nerdctl run -d --name nginx -p 127.0.0.1:8080:80 nginx:alpine ``` -### FreeBSD +### Windows -See [`./docs/freebsd.md`](docs/freebsd.md). +Currently, there is experimental support for Windows (see below for features that are currently known to work). -### Windows +To set up on Windows, first make sure you have [installed `containerd`](https://github.com/containerd/containerd/blob/main/docs/getting-started.md#installing-containerd-on-windows) then run the following in PowerShell: + +```powershell +$Version="1.2.1" # update to your version of choice +# the following is based on amd64, for other architectures, see release page +curl.exe -L https://github.com/containerd/nerdctl/releases/download/v$Version/nerdctl-$Version-windows-amd64.tar.gz -o nerdctl-$Version-windows-amd64.tar.gz +tar.exe xvf nerdctl-$Version-windows-amd64.tar.gz +Copy-Item .\nerdctl.exe $Env:ProgramFiles\containerd -Force +``` +If you already added `$Env:ProgramFiles\containerd` in the `PATH`, you should have `nerdctl` accessible from anywhere now: + +```powershell +nerdctl --version +``` -- Linux containers: Known to work on WSL2 -- Windows containers: experimental support for Windows (see below for features that are currently known to work) +### FreeBSD + +See [`./docs/freebsd.md`](docs/freebsd.md). ### Docker