dockerDesktop依赖wsl,及docker可视化推荐Portainer

目录

宝塔和1panel和portranier对比

wsl与docker Desktop互通


今天无意中发现的Portainer

之前采用的1panel和宝塔做运维可视化

现在换成docker+Portainer

宝塔和1panel和portranier对比

宝塔广告太多,而且不适合深入了解运维技术

1panel个人感觉无广告颜值很高,但是还是有局限,不适合深入了解运维技术

如果是后期了解了运维和docker的话,我推荐portainer

参考Docker可视化工具——Portainer全解 - 腾讯云开发者社区-腾讯云 (tencent.com)

1.在本机的wsl的ubuntu执行安装命令

#通过命令安装 Portainer
​
docker volume create portainer_data
docker run -d -p 9000:9000 -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer
cd /usr/libexec/docker/
sudo ln -s docker-runc-current docker-runc

可以在win上面的dockerdesktop发现 启动了一个docker容器

2.通过本地浏览器访问:http://服务器公网IP:9000, 直接进入 Portainer 界面

可以发现wsl上的docker容器都是   win下面dockerDesktop的docker

这俩玩意其实就是dockerDesktop把你的win下的wsl的docker可视化了

 

docker Desktop本质是wsl

参考:https://segmentfault.com/a/1190000022059895

实际上docker Desktop也就是跑了一个wsl(这个wsl叫做docker desktop),然后在这个wsl运行你的docker

想要通过命令行控制可以直接使用windows powerShell

注:设置中未启用其他wsl(如Ubuntu名字的wsl)依赖时候,docker desktop只与其自己的wsl有关联,即只可以通过powershell来找和控制

 

 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
Docker Desktop with WSL (Windows Subsystem for Linux) allows you to run Docker containers on Windows using a Linux distribution. By integrating Docker with WSL, you can leverage the benefits of both Docker and WSL to develop and run containerized applications on your Windows machine. To get started with Docker Desktop and WSL, you need to follow these steps: 1. Install Docker Desktop: Download and install Docker Desktop for Windows from the Docker website. Make sure to enable the WSL 2 backend during installation. 2. Enable WSL: Open PowerShell as an administrator and run the following command to enable WSL: ``` wsl --install ``` This command will install WSL and Linux kernel updates on your Windows machine. 3. Choose a Linux distribution: Open the Microsoft Store, search for your preferred Linux distribution (e.g., Ubuntu, Debian), and install it. This distribution will be used by Docker to run containers. 4. Set WSL version: Open PowerShell as an administrator and run the following command to set WSL version 2 as default: ``` wsl --set-default-version 2 ``` 5. Configure Docker to use WSL: Open Docker Desktop, go to "Settings," select "General," and check the "Use the WSL 2 based engine" option. Then, select the WSL default distribution you installed in step 3. 6. Test Docker: Open a terminal (WSL) and run the following command to verify that Docker is working: ``` docker run hello-world ``` If everything is set up correctly, you should see a "Hello from Docker!" message. That's it! Now you can start running Docker containers using the Linux distribution installed through WSL. Remember that you can also access files and directories on your Windows machine from within the Linux environment to build and run your containerized applications.

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Fars

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值