docker - 无法在 AWS 上的 Windows Server 2019 上运行 Linux Docker 容器
问题描述
我在 AWS 上有一个 windows server 2019,我已经按照以下说明安装和设置了 Linux Docker Container。
Install-Module DockerMsftProvider -Force
Install-Package Docker -ProviderName DockerMsftProvider -Force
Restart-Computer
$configfile =@"
{
"experimental":true
}
"@
$configfile|Out-File -FilePath c:\ProgramData\docker\config\daemon.json -Encoding ascii -Force
[Environment]::SetEnvironmentVariable("LCOW_SUPPORTED", "1", "Machine")
Invoke-WebRequest -Uri "https://github.com/linuxkit/lcow/releases/download/v4.14.35-v0.3.9/release.zip" -UseBasicParsing -OutFile release.zip
Expand-Archive release.zip -DestinationPath "$Env:ProgramFiles\Linux Containers\."
Restart-Service Docker
但是,在运行任何 Linux 映像时出现以下错误:
PS C:\Users\Administrator> docker run --rm -it --platform=linux ubuntu bash
docker: Error response from daemon: failed to start service utility VM (createreadwrite): hcsshim::CreateComputeSystem 4242d968c7830dd923c657267486ea32ae9d843c76041d3b4beb39146efc5ea2_svm: The virtual machine could not be started because a required feature is not installed.
(extra info: {"SystemType":"container","Name":"4242d968c7830dd923c657267486ea32ae9d843c76041d3b4beb39146efc5ea2_svm","Layers":null,"HvPartition":true,"HvRuntime":{"ImagePath":"C:\\Program Files\\Linux Containers","LinuxInitrdFile":"initrd.img","LinuxKernelFile":"kernel"},"ContainerType":"linux","TerminateOnLastHandleClosed":true}).
See 'docker run --help'.
此外,还启用了容器功能和 Hyper-V 角色。
这是 docker 版本信息。
我关注了大部分文章、博客,并在过去几个小时内使用了不同版本的 Docker EE(包括预览版),但无济于事。有没有人能够解决类似的问题?任何帮助表示赞赏。如果需要更多信息,请告诉我。
解决方案
推荐阅读
- excel - 如何在 VBA 中使用 sql 查询并将数据从一个 Excel 工作表获取到另一个工作表?
- python - Python 脚本和 Tweepy 的 Cron 作业
- excel - MURAL Web Scraping 编译错误 - 项目或库
- sql - sql查询返回事件链
- ruby-on-rails - 在 Rails 中使用一个模型和另一个模型上的两个属性创建连接表
- c# - 编译带有外部cs文件依赖的dll
- itfoxtec-identity-saml2 - 来自 AuthnRequest 的 AssertionConsumerServiceURL 不是来自 Config
- android - Android/iOS 应用商店要求一个简单的 Cordova 应用程序,然后将 Web 视图转发到外部 Javascript 应用程序
- java - 比较两个不同的数据类型对?
- c# - 如何在 AWS CDK PolicyStatement AddAction 方法中嵌套 KeyValue 对?