在windows server中安装docker

windows server 建议选择win10系统.
首先要下载wsl2:
主要参考微软官方文档:https://learn.microsoft.com/en-us/windows/wsl/install-on-server;
https://learn.microsoft.com/en-us/windows/wsl/install-manual
1.右键开始菜单并以管理员身份运行 PowerShell,执行以下命令:

Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
2.由于是windows server,不能使用microsoft store,而使用Invoke-WebRequest -Uri https://aka.ms/wslubuntu2004 -OutFile Ubuntu.appx -UseBasicParsing
或者curl.exe -L -o ubuntu-2004.appx https://aka.ms/wslubuntu2004,速度又非常非常慢,于是,可以手动下载:、

3.下载后:
再添加这个即可

2.点击 Get started with Docker Desktop,并下载 Windows 的版本
双击下载的 Docker for Windows Installer 安装文件,一路 Next,点击 Finish 完成安装。

posted @ 2023-05-15 23:14  JohnYang819  阅读(492)  评论(0编辑  收藏  举报