docker安装window版
docker下载 安装
下载地址: https://docs.docker.com/get-docker/
选择你的系统点击相对应的下载
window
直接点下一步 下一步 安装即可
到这里已经下载安装完成要是能跑hello world 则忽略一下步骤
In [ ]:
In [ ]:
windows需要安装WSL 2 和打开虚拟化
In [ ]:
打开控制面板-> 程序和功能-> 启用或关闭Windows功能,勾选Hyper-V相关选项,确认,等待配置,提示重启
In [ ]:
打开控制面板-> 程序和功能-> 启用或关闭Windows功能,勾选打开linux子系统相关选项,确认,等待配置,提示重启
In [ ]:
WSL 2 下载安装 https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi
安装WSL 2
一样直接点下一步
In [ ]:
## 安装完成换docker 镜像源
把下面的添加到配置的josn文件里面
In [ ]:
"registry-mirrors": [
"http://hub-mirror.c.163.com",
"https://docker.mirrors.ustc.edu.cn",
"https://registry.docker-cn.com"
]
手动修改文件方法
In [ ]:
C:\Users\lihuaqiao\.docker\daemon.json
在docker中修改方法
这里可忽略
docker
cd "C:\Program Files\Docker\Docker"
DockerCli.exe -SwitchDaemon
In [ ]:
In [ ]:
查看docker信息 打开cmd输入下面信息
In [ ]:
docker info
In [ ]:
Client:
Context: default
Debug Mode: false
Plugins:
buildx: Docker Buildx (Docker Inc., v0.8.2)
compose: Docker Compose (Docker Inc., v2.7.0)
extension: Manages Docker extensions (Docker Inc., v0.2.8)
sbom: View the packaged-based Software Bill Of Materials (SBOM) for an image (Anchore Inc., 0.6.0)
scan: Docker Scan (Docker Inc., v0.17.0)
Server:
Containers: 3
Running: 0
Paused: 0
Stopped: 3
Images: 1
Server Version: 20.10.17
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Native Overlay Diff: true
userxattr: false
Logging Driver: json-file
Cgroup Driver: cgroupfs
Cgroup Version: 1
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: inactive
Runtimes: io.containerd.runtime.v1.linux runc io.containerd.runc.v2
Default Runtime: runc
Init Binary: docker-init
containerd version: 10c12954828e7c7c9b6e0ea9b0c02b01407d3ae1
runc version: v1.1.2-0-ga916309
init version: de40ad0
Security Options:
seccomp
Profile: default
Kernel Version: 5.10.16.3-microsoft-standard-WSL2
Operating System: Docker Desktop
OSType: linux
Architecture: x86_64
CPUs: 8
Total Memory: 12.23GiB
Name: docker-desktop
ID: P3WR:VVBO:HTON:AZLY:ZPET:D27R:G5VM:NXSV:HEZM:4T5U:4TUW:QI42
Docker Root Dir: /var/lib/docker
Debug Mode: false
HTTP Proxy: http.docker.internal:3128
HTTPS Proxy: http.docker.internal:3128
No Proxy: hubproxy.docker.internal
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
hubproxy.docker.internal:5000
127.0.0.0/8
Live Restore Enabled: false
WARNING: No blkio throttle.read_bps_device support
WARNING: No blkio throttle.write_bps_device support
WARNING: No blkio throttle.read_iops_device support
WARNING: No blkio throttle.write_iops_device support
In [ ]:
运行 hello world
In [ ]:
docker run hello-world
In [ ]:
Hello from Docker!
This message shows that your installation appears to be working correctly.
To generate this message, Docker took the following steps:
1. The Docker client contacted the Docker daemon.
2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
(amd64)
3. The Docker daemon created a new container from that image which runs the
executable that produces the output you are currently reading.
4. The Docker daemon streamed that output to the Docker client, which sent it
to your terminal.
To try something more ambitious, you can run an Ubuntu container with:
$ docker run -it ubuntu bash
Share images, automate workflows, and more with a free Docker ID:
https://hub.docker.com/
For more examples and ideas, visit:
https://docs.docker.com/get-started/
C:\Users\lihuaqiao>ssh root@8.210.250.111
root@8.210.250.111's password:
Last login: Sat Aug 13 19:04:05 2022 from 119.32.73.129
Welcome to Alibaba Cloud Elastic Compute Service !
In [ ]:
In [ ]:
到这里便安装完成
In [ ]: