Docker 桌面未显示 运行 个容器
Docker desktop not showing running containers
我在 ubuntu 22 上使用 Docker 桌面(测试版),安装后一切正常。现在我正在尝试使用 Docker 桌面,但它没有显示容器。但是我可以在命令行上 运行 一个容器:
I am running the initial recommended container docker run -d -p 80:80 docker/getting-started
blah@blah-laptop:~$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
blah@blah-laptop:~$ docker run -d -p 80:80 docker/getting-started
b04dad852c36d70393e464ec026adfedb5be2d692557cd70327dc29b0b51c8c5
blah@blah-laptop:~$ docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
b04dad852c36 docker/getting-started "/docker-entrypoint.…" 5 seconds ago Up 4 seconds 0.0.0.0:80->80/tcp, :::80->80/tcp pensive_lamport
blah@blah-laptop:~$
有趣的是容器没有出现在 Docker 桌面上
我试图更改“设置 -> 资源”上的目录,它添加了“DockerDestop”吃了它的末尾:
运行诊断工具,错误好像是windows错误(意义不大)
[PASS] DD0031: does the Docker API work?
[PASS] DD0004: is the Docker engine running?
[PASS] DD0011: are the LinuxKit services running?
[PASS] DD0016: is the LinuxKit VM running?
[FAIL] DD0001: is the application running? Docker is not running
[FAIL] DD0018: does the host support virtualization? not implemented
[PASS] DD0017: can a VM be started?
[PASS] DD0015: are the binary symlinks installed?
[PASS] DD0003: is the Docker CLI working?
[PASS] DD0013: is the $PATH ok?
[PASS] DD0007: is the backend responding?
[FAIL] DD0014: are the backend processes running? 3 errors occurred:
* querying com.docker.backend process: is it running as a different user?: readlink /proc/3726/exe: permission denied
* querying com.docker.backend process: is it running as a different user?: readlink /proc/3770/exe: permission denied
* com.docker.hyperkit is not running
[PASS] DD0008: is the native API responding?
[FAIL] DD0009: is the vpnkit API responding? dial unix /home/blah/.docker/desktop/vpnkit.diag.sock: connect: no such file or directory
[PASS] DD0010: is the Docker API proxy responding?
[PASS] DD0012: is the VM networking working?
[PASS] DD0032: do Docker networks overlap with host IPs?
[SKIP] DD0030: is the image access management authorized?
[PASS] DD0033: does the host have Internet access?
1 failures detected
1 : does the host support virtualization?
Failed with: not implemented
The Docker engine runs inside a Linux VM. Therefore the host must support virtualization.
Check that hardware-assisted virtualization (either Intel VMX or AMD SVM) and Data Execution Prevention (sometimes labeled XD or Execute Disable or NX) are enabled in your BIOS.
Check your bootloader is configured to launch Hyper-V.
See https://docs.docker.com/desktop/windows/troubleshoot/#virtualization
self-diagnose took 1.082803913s
有什么尝试的想法吗?
找出我的错误,我 运行 docker 在错误的上下文中。
它使用默认值,当我将上下文更改为 docker-desktop
它起作用了。
blah@blah-laptop:~$ docker context ls
NAME DESCRIPTION DOCKER ENDPOINT KUBERNETES ENDPOINT ORCHESTRATOR
default * Current DOCKER_HOST based configuration unix:///var/run/docker.sock swarm
desktop-linux unix:///home/blah/.docker/desktop/docker.sock
rootless Rootless mode unix:///run/user/1000/docker.sock
blah@blah-laptop:~$ docker context use desktop-linux
desktop-linux
Current context is now "desktop-linux"
blah@blah-laptop:~$ docker context ls
NAME DESCRIPTION DOCKER ENDPOINT KUBERNETES ENDPOINT ORCHESTRATOR
default Current DOCKER_HOST based configuration unix:///var/run/docker.sock swarm
desktop-linux * unix:///home/blah/.docker/desktop/docker.sock
rootless Rootless mode unix:///run/user/1000/docker.sock
在 运行 宁 docker-desktop 和 docker 命令或 docker-compose 时检查用户。可能您以 root 身份安装了桌面或 运行 docker 命令。
我在 ubuntu 22 上使用 Docker 桌面(测试版),安装后一切正常。现在我正在尝试使用 Docker 桌面,但它没有显示容器。但是我可以在命令行上 运行 一个容器:
I am running the initial recommended container docker run -d -p 80:80 docker/getting-started
blah@blah-laptop:~$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
blah@blah-laptop:~$ docker run -d -p 80:80 docker/getting-started
b04dad852c36d70393e464ec026adfedb5be2d692557cd70327dc29b0b51c8c5
blah@blah-laptop:~$ docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
b04dad852c36 docker/getting-started "/docker-entrypoint.…" 5 seconds ago Up 4 seconds 0.0.0.0:80->80/tcp, :::80->80/tcp pensive_lamport
blah@blah-laptop:~$
有趣的是容器没有出现在 Docker 桌面上
我试图更改“设置 -> 资源”上的目录,它添加了“DockerDestop”吃了它的末尾:
运行诊断工具,错误好像是windows错误(意义不大)
[PASS] DD0031: does the Docker API work?
[PASS] DD0004: is the Docker engine running?
[PASS] DD0011: are the LinuxKit services running?
[PASS] DD0016: is the LinuxKit VM running?
[FAIL] DD0001: is the application running? Docker is not running
[FAIL] DD0018: does the host support virtualization? not implemented
[PASS] DD0017: can a VM be started?
[PASS] DD0015: are the binary symlinks installed?
[PASS] DD0003: is the Docker CLI working?
[PASS] DD0013: is the $PATH ok?
[PASS] DD0007: is the backend responding?
[FAIL] DD0014: are the backend processes running? 3 errors occurred:
* querying com.docker.backend process: is it running as a different user?: readlink /proc/3726/exe: permission denied
* querying com.docker.backend process: is it running as a different user?: readlink /proc/3770/exe: permission denied
* com.docker.hyperkit is not running
[PASS] DD0008: is the native API responding?
[FAIL] DD0009: is the vpnkit API responding? dial unix /home/blah/.docker/desktop/vpnkit.diag.sock: connect: no such file or directory
[PASS] DD0010: is the Docker API proxy responding?
[PASS] DD0012: is the VM networking working?
[PASS] DD0032: do Docker networks overlap with host IPs?
[SKIP] DD0030: is the image access management authorized?
[PASS] DD0033: does the host have Internet access?
1 failures detected
1 : does the host support virtualization?
Failed with: not implemented
The Docker engine runs inside a Linux VM. Therefore the host must support virtualization.
Check that hardware-assisted virtualization (either Intel VMX or AMD SVM) and Data Execution Prevention (sometimes labeled XD or Execute Disable or NX) are enabled in your BIOS.
Check your bootloader is configured to launch Hyper-V.
See https://docs.docker.com/desktop/windows/troubleshoot/#virtualization
self-diagnose took 1.082803913s
有什么尝试的想法吗?
找出我的错误,我 运行 docker 在错误的上下文中。
它使用默认值,当我将上下文更改为 docker-desktop
它起作用了。
blah@blah-laptop:~$ docker context ls
NAME DESCRIPTION DOCKER ENDPOINT KUBERNETES ENDPOINT ORCHESTRATOR
default * Current DOCKER_HOST based configuration unix:///var/run/docker.sock swarm
desktop-linux unix:///home/blah/.docker/desktop/docker.sock
rootless Rootless mode unix:///run/user/1000/docker.sock
blah@blah-laptop:~$ docker context use desktop-linux
desktop-linux
Current context is now "desktop-linux"
blah@blah-laptop:~$ docker context ls
NAME DESCRIPTION DOCKER ENDPOINT KUBERNETES ENDPOINT ORCHESTRATOR
default Current DOCKER_HOST based configuration unix:///var/run/docker.sock swarm
desktop-linux * unix:///home/blah/.docker/desktop/docker.sock
rootless Rootless mode unix:///run/user/1000/docker.sock
在 运行 宁 docker-desktop 和 docker 命令或 docker-compose 时检查用户。可能您以 root 身份安装了桌面或 运行 docker 命令。