Created
April 21, 2025 19:53
-
-
Save rpavlik/6e48eac47032540b9a045adf1d611cc2 to your computer and use it in GitHub Desktop.
Setting up gcp for windows containers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add-WindowsFeature Containers |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Containerd - from their getting started. | |
# Download and extract desired containerd Windows binaries | |
$Version="1.7.13" # update to your preferred version | |
$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-$Arch.tar.gz | |
# Copy | |
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" | |
[Environment]::SetEnvironmentVariable( "Path", $Path, "Machine") | |
# reload path, so you don't have to open a new PS terminal later if needed | |
$Env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User") | |
# configure | |
containerd.exe config default | Out-File $Env:ProgramFiles\containerd\config.toml -Encoding ascii | |
# Register and start service | |
containerd.exe --register-service | |
Start-Service containerd | |
## Nerdctl | |
curl.exe -LO https://github.com/containerd/nerdctl/releases/download/v2.0.4/nerdctl-2.0.4-windows-amd64.tar.gz | |
tar.exe xvf .\nerdctl-2.0.4-windows-amd64.tar.gz | |
# Put it in the path too | |
Copy-Item -Path .\nerdctl.exe -Destination $Env:ProgramFiles\containerd -Force |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment