From bdea6f87389fb1799589cd7fd957128a60af2926 Mon Sep 17 00:00:00 2001 From: Yuaninga <64267484+Yuaninga@users.noreply.github.com> Date: Mon, 21 Sep 2020 23:38:11 +0800 Subject: [PATCH] Update container-runtimes.md Supplement the Chinese version of containerd installed by windows when running the container of community production environment Signed-off-by: Yuaninga <1846225041@qq.com> --- .../container-runtimes.md | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/content/zh/docs/setup/production-environment/container-runtimes.md b/content/zh/docs/setup/production-environment/container-runtimes.md index 4772996131..500ea95345 100644 --- a/content/zh/docs/setup/production-environment/container-runtimes.md +++ b/content/zh/docs/setup/production-environment/container-runtimes.md @@ -842,6 +842,36 @@ systemctl restart containerd # 重启 containerd systemctl restart containerd ``` +{{% /tab %}} + +{{% tab name="Windows/(PowerShell)" %}} + +```powershell +# (安装 containerd ) +# 下载 contianerd +cmd /c curl -OL https://github.com/containerd/containerd/releases/download/v1.4.0-beta.2/containerd-1.4.0-beta.2-windows-amd64.tar.gz +cmd /c tar xvf .\containerd-1.4.0-beta.2-windows-amd64.tar.gz +``` + +```powershell +# 添加开机启动 +Copy-Item -Path ".\bin\" -Destination "C:\Program Files\containerd" -Recurse -Force +cd C:\Program Files\containerd\ +.\containerd.exe config default | Out-File config.toml -Encoding ascii + +# 检查配置文件主要看以下三个参数 +# sandbox_image 的镜像地址 +# CNI 的 bin_dir 和 conf_dir 路径 +Get-Content config.toml +``` + +```powershell +# containerd 注册服务 +.\containerd.exe --register-service +# 启动 containerd +Start-Service containerd +``` + {{% /tab %}} {{< /tabs >}}