title |
---|
在WSL上准备 |
androllen@DESKTOP-QKA9IF0:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04 LTS
Release: 20.04
Codename: focal
-
在线下载
- 更新源
cd /etc/apt/ sudo cp sources.list sources.list.old sudo vim sources.list deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse esc / shift + ZZ
-
更新
sudo apt update
-
# 当前版本是 Ubuntu 20.04 LTS 所以无法安装 docker-ce,请按照对应的 Ubuntu 版本来安装社区版 sudo apt install docker.io
-
卸载
whereis docker.io sudo apt-get autoremove --purge docker.io # or sudo apt-get purge docker.io sudo rm -rf /var/lib/docker
-
离线下载
-
离线安装
# 通过 `winscp ssh` 上传到 /home/androllen $ sudo dpkg -i containerd.io_1.2.5-1_amd64.deb $ sudo dpkg -i docker-ce_18.09.6_3-0_ubuntu-bionic_amd64.deb $ sudo dpkg -i docker-ce-cli_18.09.6_3-0_ubuntu-bionic_amd64.deb
-
VSCode
-
Ubuntu 安装路径
# Ubuntu 安装路径 C:\Users\%USERNAME%\AppData\Local\Packages\CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc\LocalState\rootfs\home\%USERNAME%
Portainer是Docker的图形化管理工具
$ docker pull portainer/portainer
$ docker run -d -p 9000:9000 --name portainer --restart always -v /var/run/docker.sock:/var/run/docker.sock -v C:\ProgramData\Portainer:/data portainer/portainer
# 访问:http://localhost:9000