在Windows上安装Docker

Ubuntu中安装Docker
来源:https://www.bilibili.com/video/BV1AA4y1S7cF/?spm_id_from=333.337.search-card.all.click&vd_source=01647a5a28aa4f169297611d3728fdcd

教程1:
在Windows上安装Docker桌面

CSDN上的教程2

https://blog.csdn.net/weixin_48386220/article/details/131920077

如何查看是否开启windows10和windows11的虚拟化
https://zhuanlan.zhihu.com/p/586751199

出现错误:
适用于 Linux 的 Windows 子系统没有已安装的分发版。 可以通过访问 Microsoft Store 来安装分发版: https://aka.ms/wslstore

解决方案,输入命令:

1
wsl --install -d Ubuntu-20.04

参考来源:
https://www.cnblogs.com/valin/p/15354660.html

https://docs.docker.com/desktop/wsl/?uuid=791E8864-B2BC-44BF-9792-C5A4022B281B

https://blog.csdn.net/qq_41980849/article/details/126257321

WSL 是什么?
微软推出的虚拟机工具

国内的docker镜像,可以在{}中添加如下代码:

1
2
3
4
5
6
7
"registry-mirrors" : [
"https://registry.docker-cn.com",
"http://hub-mirror.c.163.com",
"https://docker.mirrors.ustc.edu.cn",
"https://cr.console.aliyun.com",
"https://mirror.ccs.tencentyun.com"
],

完整版

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
{"registry-mirrors" : [
"https://registry.docker-cn.com",
"http://hub-mirror.c.163.com",
"https://docker.mirrors.ustc.edu.cn",
"https://cr.console.aliyun.com",
"https://mirror.ccs.tencentyun.com"
],
"builder": {
"gc": {
"defaultKeepStorage": "20GB",
"enabled": true
}
},
"experimental": false
}

指令

1
2
3
4
sudo apt-get update
(sudo apt-get install ./docker-desktop-<version>-<arch>.deb)

sudo apt-get install -y docker.io

内核版本的检查

1
$uname -a

驱动的检查 device mapper
$ ls -l /sys/class/misc/device-mapper

docker run -it -d -p 80:80 -p 8188:8188 -p 3306:3306 -e EZONE_URL=IP地址 -v /ezone/data/logs:/root/logs -v /ezone/data/mysql:/data/mysql -v /ezone/data/redis:/data/redis -v /ezone/data/elasticsearch:/data/elasticsearch -v /ezone/data/avatar:/data/base/avatar -v /ezone/data/repos:/data/ezcode/repos -v /ezone/data/cilog:/app/data/cilog -v /ezone/data/reports:/app/data/reports -v /ezone/data/pkg:/data/pkg -v /ezone/data/attachment:/app/storage –privileged=true –restart always –name ezone hub.kce.ksyun.com/ezone-public/ezone-all:0.0.0.1258.1

IP:172.23.36.122
容器ID 03d0857abe8a

docker run -it -d -p 80:80 -p 8188:8188 -p 3306:3306 -e EZONE_URL=172.23.36.122 -v /ezone/data/logs:/root/logs -v /ezone/data/mysql:/data/mysql -v /ezone/data/redis:/data/redis -v /ezone/data/elasticsearch:/data/elasticsearch -v /ezone/data/avatar:/data/base/avatar -v /ezone/data/repos:/data/ezcode/repos -v /ezone/data/cilog:/app/data/cilog -v /ezone/data/reports:/app/data/reports -v /ezone/data/pkg:/data/pkg -v /ezone/data/attachment:/app/storage –privileged=true –restart always –name ezone hub.kce.ksyun.com/ezone-public/ezone-all:0.0.0.1258.1

IP:172.23.36.122
容器ID 20f880514037

https://www.cnblogs.com/easy5weikai/p/16389012.html

作者

谷雨淋雨

发布于

2023-10-01

更新于

2024-01-04

许可协议

You need to set install_url to use ShareThis. Please set it in _config.yml.
You forgot to set the business or currency_code for Paypal. Please set it in _config.yml.

评论

You forgot to set the shortname for Disqus. Please set it in _config.yml.