windows10离线安装docker并使用linux子系统部署nacos作为注册中心(上)

简介: windows10离线安装docker并使用linux子系统部署nacos作为注册中心

目录

一、windows10离线安装linux子系统

二、windows离线安装docker

三、Ubuntu子系统连接docker

四、离线安装mysql镜像并启动

五、离线安装nacos镜像并启动

六、总结      

参考:

本机Linux子系统Ubuntu免密登陆远程服务器同时实现多用户免密登陆服务器

、windows10离线安装linux子系统

  1. 打开开发人员模式

image.png

2、打开控制面板,搜索程序,点击启用或关闭Windows功能。

image.png

3、勾选适用于linux的Windows子系统,并重启电脑。

image.png

4、下载ubutu安装包并解压,这个是Ubuntu_1804.2019.522.0_x64版本。将下载的安装包为appx的扩展名改为zip。可以从这个地址下载:见文末。然后解压。用管理员身份执行ubuntu.exe程序。等几分钟输入用户名和密码。

image.png

、windows离线安装docker

1、下载docker Desktop安装包,可从git地址获取,见文末,执行Docker Desktop Installer.exe文件.出现下载WSL 2。

image.png

2、下载WSL安装包,并执行,安装包地址:见文末。

3、打开控制面板,搜索程序,点击启用或关闭Windows功能,开启Hyper-V功能。

image.png

4、勾选下面的设置。

image.png

5、打开cmd执行docker version命令,可以看到docker已经启动。

image.png

Ubuntu子系统连接docker

1、启动ubuntu子系统,执行下面命令到root用户

sudo –s

执行docker version 报错:The command 'docker' could not be found in this WSL 1 distro.

解决方案:

(1)打开cmd执行  

 wsl --set-version

image.png

(2)将version为1的修改为2,执行

wsl --set-version Ubuntu-18.04 2

image.png

(3)避免后面继续设置,将wsl默认版本设置为2,执行:

wsl --set-default-version 2

2、继续执行docker verison,报错:The command 'docker' could not be found in this WSL 2 distro.We recommend to activate the WSL integration in Docker Desktop settings.


解决方案:

  1. 打开控制面板,搜索程序,点击启用或关闭Windows功能勾选虚拟机平台和适用于Linux的Windows子系统,点击确认并重启。

image.png

3、执行docker version 时报错:Cannot connect to the Docker daemon at tcp://localhost:2375.

解决方案:

(1)在linux子系统命令行依次执行下面命令。

unset DOCKER_HOST
unset DOCKER_TLS_VERIFY
unset DOCKER_TLS_PATH
docker ps

(2)执行wsl_update_x64 (2).msi,地址:见文末。

目录
相关文章
|
6天前
|
安全 Ubuntu Linux
Nexpose 8.21.0 for Linux & Windows - 漏洞扫描
Nexpose 8.21.0 for Linux & Windows - 漏洞扫描
57 4
Nexpose 8.21.0 for Linux & Windows - 漏洞扫描
|
1月前
|
Java Linux Apache
Apache NetBeans 27 (macOS, Linux, Windows) - Java 等多语言开源跨平台 IDE
Apache NetBeans 27 (macOS, Linux, Windows) - Java 等多语言开源跨平台 IDE
124 5
Apache NetBeans 27 (macOS, Linux, Windows) - Java 等多语言开源跨平台 IDE
|
1月前
|
NoSQL IDE MongoDB
Studio 3T 2025.15 (macOS, Linux, Windows) - MongoDB 的终极 GUI、IDE 和 客户端
Studio 3T 2025.15 (macOS, Linux, Windows) - MongoDB 的终极 GUI、IDE 和 客户端
66 1
Studio 3T 2025.15 (macOS, Linux, Windows) - MongoDB 的终极 GUI、IDE 和 客户端
|
11天前
|
安全 Linux 网络安全
Metasploit Framework 6.4.88 (macOS, Linux, Windows) - 开源渗透测试框架
Metasploit Framework 6.4.88 (macOS, Linux, Windows) - 开源渗透测试框架
177 0
|
19天前
|
安全 Java Linux
Nexpose 8.19.0 for Linux & Windows - 漏洞扫描
Nexpose 8.19.0 for Linux & Windows - 漏洞扫描
38 0
Nexpose 8.19.0 for Linux & Windows - 漏洞扫描
|
安全 Linux 测试技术
OpenText Static Application Security Testing (Fortify) 25.3 (macOS, Linux, Windows) - 静态应用安全测试
OpenText Static Application Security Testing (Fortify) 25.3 (macOS, Linux, Windows) - 静态应用安全测试
73 0
|
1月前
|
安全 Linux C++
PVS‑Studio 7.38 for macOS, Linux & Windows - 代码质量安全静态分析
PVS‑Studio 7.38 for macOS, Linux & Windows - 代码质量安全静态分析
105 0
PVS‑Studio 7.38 for macOS, Linux & Windows - 代码质量安全静态分析
|
Linux iOS开发 UED
LibreOffice 25.8 (Linux, macOS, Windows) - 自由免费的全能办公套件
LibreOffice 25.8 (Linux, macOS, Windows) - 自由免费的全能办公套件
38 0
|
19天前
|
缓存 安全 Linux
Metasploit Pro 4.22.8-2025082101 (Linux, Windows) - 专业渗透测试框架
Metasploit Pro 4.22.8-2025082101 (Linux, Windows) - 专业渗透测试框架
75 0
|
27天前
|
安全 Linux API
JEB Pro v5.31 (macOS, Linux, Windows) - 逆向工程平台
JEB Pro v5.31 (macOS, Linux, Windows) - 逆向工程平台
62 0