windows - 如何在 Windows 上运行 ubuntu 容器?

标签 windows docker

我是 Docker 新手,并按照入门文档 https://docs.docker.com/docker-for-windows/#explore-the-application-and-run-examples 进行操作。 .

当我运行“docker run -it ubuntu bash”时,出现以下错误:

Unable to find image 'ubuntu:latest' locally latest: Pulling from library/ubuntu C:\Program Files\Docker\Docker\Resources\bin\docker.exe: no matching manifest for windows/amd64 in the manifest list entries. See 'C:\Program Files\Docker\Docker\Resources\bin\docker.exe run --help'.

这里是其他 docker 信息:

docker 版本

Client:
 Version:      17.06.1-ce
 API version:  1.30
 Go version:   go1.8.3
 Git commit:   874a737
 Built:        Thu Aug 17 22:48:20 2017
 OS/Arch:      windows/amd64

Server:
 Version:      17.06.1-ce
 API version:  1.30 (minimum version 1.24)
 Go version:   go1.8.3
 Git commit:   874a737
 Built:        Thu Aug 17 23:03:03 2017
 OS/Arch:      windows/amd64
 Experimental: true

docker 信息

Containers: 1
 Running: 0
 Paused: 0
 Stopped: 1
Images: 1
Server Version: 17.06.1-ce
Storage Driver: windowsfilter
 Windows:
Logging Driver: json-file
Plugins:
 Volume: local
 Network: l2bridge l2tunnel nat null overlay transparent
 Log: awslogs etwlogs fluentd json-file logentries splunk syslog
Swarm: inactive
Default Isolation: hyperv
Kernel Version: 10.0 15063 (15063.0.amd64fre.rs2_release.170317-1834)
Operating System: Windows 10 Pro
OSType: windows
Architecture: x86_64
CPUs: 12
Total Memory: 31.92GiB
ID: ZVBR:TM24:KXS3:NF5Y:WJTD:7JR3:S4UB:TFIZ:7G32:EHIL:4TKD:RK3V
Docker Root Dir: C:\ProgramData\Docker
Debug Mode (client): false
Debug Mode (server): true
 File Descriptors: -1
 Goroutines: 20
 System Time: 2017-09-28T10:05:53.8801328-07:00
 EventsListeners: 0
Registry: https://index.docker.io/v1/
Experimental: true
Insecure Registries:
 127.0.0.0/8
Live Restore Enabled: false

我有点困惑,为什么 OS/Arch 版本显示 windows/amd64 而架构下的 info 显示 x86_64。

任何有关错误消息的帮助都会很棒。

最佳答案

您的问题是您在 Windows 容器模式下使用 docker 并尝试提取一个 ubuntu 镜像,该镜像是 linux 容器镜像。你不能那样做。您可以运行 windows 容器,也可以运行 linux 容器。

您可以通过右键单击 docker 托盘图标来切换到 Linux 容器模式,如下图所示

Switch to Linux Containers

另外 windows/amd64x86_64 都表示 64 位操作系统,仅此而已

关于windows - 如何在 Windows 上运行 ubuntu 容器?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46474777/

相关文章:

ruby-on-rails - 通过环境变量为 Apache 设置 Rails 环境

windows - Go 编译器可以安装在 Windows 上吗?

c++ - 是否有 Linux 等效的 SetupDiGetClassDevs 函数

docker - 如何在Dockerfile中设置账户密码?

docker - 无法连接到在本地 Docker 容器中运行的 Go GRPC 服务器

docker - 更改docker根文件夹后如何查找docker.socket文件?

python - 使用 Python 编辑 Windows 8 电源选项

c - Windows cmake 找不到 memset 或其他标准函数

c# - 免费安装程序是否可以轻松地将应用程序安装为 Windows 服务?

python - 导入用 Cython 制作的 .so 文件导致 ImportError : . .. undefined symbol