bla*_*lah 21 docker docker-desktop
我在 ubuntu 22 上使用 Docker 桌面(测试版),安装后一切看起来都很好。现在我尝试使用 Docker Desktop,但它显示没有容器。但是我可以在命令行上运行容器:
\nI am running the initial recommended container docker run -d -p 80:80 docker/getting-started\nblah@blah-laptop:~$ docker ps\nCONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES\nblah@blah-laptop:~$ docker run -d -p 80:80 docker/getting-started\nb04dad852c36d70393e464ec026adfedb5be2d692557cd70327dc29b0b51c8c5\nblah@blah-laptop:~$ docker ps -a\nCONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES\nb04dad852c36 docker/getting-started "/docker-entrypoint.\xe2\x80\xa6" 5 seconds ago Up 4 seconds 0.0.0.0:80->80/tcp, :::80->80/tcp pensive_lamport\nblah@blah-laptop:~$ \nRun Code Online (Sandbox Code Playgroud)\n有趣的是容器没有出现在 Docker Desktop 上
\n\n我尝试更改“设置 -> 资源”上的目录,它添加了“DockerDestop”,它的末尾是:\n
运行诊断工具,该错误似乎像 Windows 错误(这没有多大意义)
\n[PASS] DD0031: does the Docker API work?\n[PASS] DD0004: is the Docker engine running?\n[PASS] DD0011: are the LinuxKit services running?\n[PASS] DD0016: is the LinuxKit VM running?\n[FAIL] DD0001: is the application running? Docker is not running\n[FAIL] DD0018: does the host support virtualization? not implemented\n[PASS] DD0017: can a VM be started?\n[PASS] DD0015: are the binary symlinks installed?\n[PASS] DD0003: is the Docker CLI working?\n[PASS] DD0013: is the $PATH ok?\n[PASS] DD0007: is the backend responding?\n[FAIL] DD0014: are the backend processes running? 3 errors occurred:\n * querying com.docker.backend process: is it running as a different user?: readlink /proc/3726/exe: permission denied\n * querying com.docker.backend process: is it running as a different user?: readlink /proc/3770/exe: permission denied\n * com.docker.hyperkit is not running\n\n\n[PASS] DD0008: is the native API responding?\n[FAIL] DD0009: is the vpnkit API responding? dial unix /home/blah/.docker/desktop/vpnkit.diag.sock: connect: no such file or directory\n[PASS] DD0010: is the Docker API proxy responding?\n[PASS] DD0012: is the VM networking working?\n[PASS] DD0032: do Docker networks overlap with host IPs?\n[SKIP] DD0030: is the image access management authorized?\n[PASS] DD0033: does the host have Internet access?\n1 failures detected\n1 : does the host support virtualization?\n Failed with: not implemented\nThe Docker engine runs inside a Linux VM. Therefore the host must support virtualization.\n\nCheck 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.\n\nCheck your bootloader is configured to launch Hyper-V.\n\nSee https://docs.docker.com/desktop/windows/troubleshoot/#virtualization\n\nself-diagnose took 1.082803913s\nRun Code Online (Sandbox Code Playgroud)\n关于尝试什么有什么想法吗?
\nbla*_*lah 32
找出我的错误,我在错误的上下文中运行 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
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
23433 次 |
| 最近记录: |