Merge pull request #9894 from profnandaa/docs/fix-windows-instructions-2
fix(docs): fix duplicate instructions for windows installation
This commit is contained in:
commit
9d108fa83b
@ -107,7 +107,7 @@ To install containerd and its dependencies from the source, see [`BUILDING.md`](
|
||||
|
||||
## Installing containerd on Windows
|
||||
|
||||
From a PowerShell session run the following commands:
|
||||
From an elevated PowerShell session (_running as Admin_) run the following commands:
|
||||
|
||||
```PowerShell
|
||||
# If containerd previously installed run:
|
||||
@ -115,16 +115,12 @@ Stop-Service containerd
|
||||
|
||||
# Download and extract desired containerd Windows binaries
|
||||
$Version="1.7.13" # update to your preferred version
|
||||
curl.exe -L https://github.com/containerd/containerd/releases/download/v$Version/containerd-$Version-windows-amd64.tar.gz -o containerd-windows-amd64.tar.gz
|
||||
tar.exe xvf .\containerd-windows-amd64.tar.gz
|
||||
|
||||
# Copy and configure
|
||||
Copy-Item -Path ".\bin" -Destination "$Env:ProgramFiles\containerd" -Recurse -Container:$false -Force
|
||||
cd $Env:ProgramFiles\containerd\
|
||||
.\containerd.exe config default | Out-File config.toml -Encoding ascii
|
||||
$Arch = "amd64" # arm64 also available
|
||||
curl.exe -LO https://github.com/containerd/containerd/releases/download/v$Version/containerd-$Version-windows-$Arch.tar.gz
|
||||
tar.exe xvf .\containerd-$Version-windows-amd64.tar.gz
|
||||
|
||||
# Copy
|
||||
Copy-Item -Path .\bin\* -Destination (New-Item -Type Directory $Env:ProgramFiles\containerd -Force) -Recurse -Force
|
||||
Copy-Item -Path .\bin -Destination $Env:ProgramFiles\containerd -Recurse -Force
|
||||
|
||||
# add the binaries (containerd.exe, ctr.exe) in $env:Path
|
||||
$Path = [Environment]::GetEnvironmentVariable("PATH", "Machine") + [IO.Path]::PathSeparator + "$Env:ProgramFiles\containerd"
|
||||
|
Loading…
Reference in New Issue
Block a user