windows 专业版 Docker 安装
下载
https://hub.docker.com/editions/community/docker-ce-desktop-windows?tab=description
安装
- 安装后遇到问题,必须开启虚拟化。
解决:https://hub.docker.com/editions/community/docker-ce-desktop-windows?tab=description
启动
-
启动遇到问题:
Docker.Core.Backend.BackendDestroyException:
Unable to destroy Hyper-V VM: 由于以下错误无法启动服务“Hyper-V 主机计算服务 (vmcompute)”: 无法启动计算机“.”上的服务 vmcompute。
在 Enable-MobyLinuxRequiredService、<无文件> 中: 第 103 行
在 、<无文件> 中: 第 804 行
在 Docker.Core.Pipe.NamedPipeClient.d__5.MoveNext()
— 引发异常的上一位置中堆栈跟踪的末尾 —
在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
在 Docker.Core.Pipe.NamedPipeClient.Send(String action, Object[] parameters)
在 Docker.Actions.DoStart(SynchronizationContext syncCtx, Boolean showWelcomeWindow, Boolean withNotifications)
在 Docker.Actions.<>c__DisplayClass26_0.b__0()
在 Docker.ApiServices.TaskQueuing.TaskQueue.<>c__DisplayClass18_0.<.ctor>b__1()System.Management.Automation.RuntimeException:
Unable to destroy Hyper-V VM: 由于以下错误无法启动服务“Hyper-V 主机计算服务 (vmcompute)”: 无法启动计算机“.”上的服务 vmcompute。
在 Enable-MobyLinuxRequiredService、<无文件> 中: 第 103 行
在 、<无文件> 中: 第 804 行
在 Docker.Backend.HyperV.HandleException(String action, Exception ex)
在 Docker.Backend.HyperV.RunScript(String action, Dictionary`2 parameters, PowerShellConfiguration config)
在 Docker.Backend.ContainerEngine.Linux.DoDestroy(Boolean keepVolume, Settings settings)
在 Docker.Backend.ContainerEngine.Linux.Start(Settings settings, String daemonOptions, Credential credential)Microsoft.PowerShell.Commands.ServiceCommandException:
由于以下错误无法启动服务“Hyper-V 主机计算服务 (vmcompute)”: 无法启动计算机“.”上的服务 vmcompute。System.InvalidOperationException: 无法启动计算机“.”上的服务 vmcompute。 在 System.ServiceProcess.ServiceController.Start(String[] args) 在 Microsoft.PowerShell.Commands.ServiceOperationBaseCommand.DoStartService(ServiceController serviceController) System.ComponentModel.Win32Exception: 服务没有及时响应启动或控制请求。
解决:
安装的时候有一个选项, 用widows 的 container 代替 linux 的container,复选勾上。
检查
- 安装成功后检查
C:\Users\LAP0393180710>docker version
Client: Docker Engine - Community
Version: 19.03.8
API version: 1.40
Go version: go1.12.17
Git commit: afacb8b
Built: Wed Mar 11 01:23:10 2020
OS/Arch: windows/amd64
Experimental: false
Server: Docker Engine - Community
Engine:
Version: 19.03.8
API version: 1.40 (minimum version 1.24)
Go version: go1.12.17
Git commit: afacb8b
Built: Wed Mar 11 01:37:20 2020
OS/Arch: windows/amd64
Experimental: false
- 拉去遇到问题
C:\Users\LAP0393180710>docker pull nginx
Using default tag: latest
latest: Pulling from library/nginx
no matching manifest for windows/amd64 10.0.18362 in the manifest list entries
解决:
settings – Docker Engine – “experimental”: true
- 国内网络链接不上docker hub问题。
解决:利用 阿里云镜像站https://6kx4zyno.mirror.aliyuncs.com
settings – Docker Engine – registry-mirrors
C:\Users\LAP0393180710>docker pull nginx
Using default tag: latest
latest: Pulling from library/nginx
123275d6e508: Pull complete 6cd6a943ce27: Pull complete a50b5ac4a7fb: Pull complete Digest: sha256:d81f010955749350ef31a119fb94b180fde8b2f157da351ff5667ae037968b28
Status: Downloaded newer image for nginx:latest
docker.io/library/nginx:latest
-
idea connetion 链接拒绝
解决:
settings – General – Expose daemon on tcp:// … 勾选
记得要restart docker -
遇到问题
1f7afb376f81: Pull complete
Digest: sha256:771240a8e1c76cc6ac6aa740d2b82de94d4b8b7dbcca5ad0cf49d12b88a3b8e7
Status: Downloaded newer image for docker.elastic.co/elasticsearch/elasticsearch:7.5.2
Creating common-mistakes-mysql57 …
Creating es01 … error
Creating es03 …
Creating es02 …
Creating common-mistakes-rabbitmq …
Creating es02 … error
Creating common-mistakes-mysql57 … error
ERROR: for es01 Cannot create container for service es1: invalid option: Windows does not support Ulimits
ERROR: for es02 Cannot create container for service es2: invalid option: Windows does not support Ulimits
ERROR: for es03 Cannot create container for service es3: invalid option: Windows does not support Ulimits
ERROR: for common-mistakes-mysql57 Cannot create container for service mysql57: failed to start service utility VM (c
reatereadwrite): hcsshim::CreateComputeSystem 58c587932019ab3781efca95bdc0eb06a3b84294c2f0c2724932d9aa33bf5da2_svm: co
ntext deadline exceeded
(extra info: {“SystemType”:“container”,“Name”:“58c587932019ab3781efca95bdc0eb06a3b84294c2f0c2724932d9aa33bf5da2_svm”,"
Layers":null,“HvPartition”:true,“HvRuntime”:{“ImagePath”:“C:\Program Files\Linux Containers”,“LinuxInitrdFile”:"init
Creating common-mistakes-redis-3 … error
ERROR: for common-mistakes-redis-3 Cannot create container for service redis: failed to start service utility VM (cre
atereadwrite): hcsshim::CreateComputeSystem 6a9b161f6a49693b5c695deecfb3a5316042f20c89b51cc5d223feb13d95894a_svm: cont
ext deadline exceeded
(extra info: {“SystemType”:“container”,“Name”:“6a9b161f6a49693b5c695deecfb3a5316042f20c89b51cc5d223feb13d95894a_svm”,"
Creating common-mistakes-rabbitmq … error
rd.img",“LinuxKernelFile”:“kernel”},“ContainerType”:“linux”,“TerminateOnLastHandleClosed”:true})
3473

被折叠的 条评论
为什么被折叠?



