Ubuntu 主机上 Docker Desktop 卷的位置?

Ubuntu 主机上 Docker Desktop 卷的位置?

在运行 Docker Desktop 的 Ubuntu 主机上,我通过 创建了一个新卷docker volume create pgadmin4。但是,我没有在主机上找到该卷。此外,预期的目录/var/lib/docker/不存在;请参阅下面的屏幕截图了解更多信息。

我尝试/var/lib/docker/以 root 用户身份列出目录,但结果仍然不存在,所以这似乎不是权限问题。

我也检查了ps -elf | grep -i "docker",似乎正在运行的二进制文件在/opt/docker-desktop/目录中;它可能与服务器略有不同docker

我将非常感谢任何提示或建议,如果您需要更多详细信息,请告诉我。

截屏:

work@dockerub:/var/lib$ docker volume inspect pgadmin4
[
    {
        "CreatedAt": "2022-07-27T20:37:43Z",
        "Driver": "local",
        "Labels": {},
        "Mountpoint": "/var/lib/docker/volumes/pgadmin4/_data",
        "Name": "pgadmin4",
        "Options": {},
        "Scope": "local"
    }
]
work@dockerub:/var/lib$ ll /var/lib/docker/volumes/pgadmin4/_data
ls: cannot access '/var/lib/docker/volumes/pgadmin4/_data': No such file or directory
work@dockerub:/var/lib$ sudo su
root@dockerub:/var/lib# ll /var/lib/docker
ls: cannot access '/var/lib/docker': No such file or directory
root@dockerub:/var/lib# ps -elf | grep -i "docker"
4 S avahi        685       1  0  80   0 -  1893 do_pol 09:41 ?        00:00:00 avahi-daemon: running [dockerub.local]
0 S work       17449    1626  0  80   0 - 445334 do_wai 09:51 ?       00:00:18 /opt/docker-desktop/bin/com.docker.backend --with-frontend
0 S work       17461   17449  0  80   0 - 390035 futex_ 09:51 ?       00:00:00 /opt/docker-desktop/bin/com.docker.backend --with-frontend
4 S work       17472   17449  0  80   0 - 5887760 do_pol 09:51 ?      00:00:16 /opt/docker-desktop/Docker Desktop --name=dashboard --enable-crashpad
0 S work       17474   17449  0  80   0 - 344712 futex_ 09:51 ?       00:00:32 vpnkit-bridge --disable wsl2-cross-distro-service,wsl2-bootstrap-expose-ports,transfused --addr tcp+bootstrap+server://0.0.0.0:0/6684d4f98fdf26edd4a03089422eb213580a7b4645490043f26ea93647f6c304 host --control-path fd:3 --bootstrap-host gateway.docker.internal --addr-fd fd:4
0 S work       17476   17449  0  80   0 - 365275 ep_pol 09:51 ?       00:00:18 com.docker.driver.amd64-linux -addr fd:3 -debug
0 S work       17477   17449  0  80   0 - 364754 futex_ 09:51 ?       00:00:01 com.docker.extensions -address extension-manager.sock -watchdog
0 S work       17479   17449  0  80   0 - 327158 futex_ 09:51 ?       00:00:00 com.docker.dev-envs
0 S work       17517   17476  0  80   0 - 383580 futex_ 09:51 ?       00:00:00 /opt/docker-desktop/bin/com.docker.driver.amd64-linux -addr fd:3 -debug
0 S work       17535   17472  0  80   0 - 4251312 do_pol 09:51 ?      00:00:00 /opt/docker-desktop/Docker Desktop --type=zygote --no-zygote-sandbox --enable-crashpad --enable-crashpad
4 S work       17536   17472  0  80   0 - 4251312 do_wai 09:51 ?      00:00:00 /opt/docker-desktop/Docker Desktop --type=zygote --enable-crashpad --enable-crashpad
1 S work       17538   17536  0  80   0 - 4251312 do_pol 09:51 ?      00:00:00 /opt/docker-desktop/Docker Desktop --type=zygote --enable-crashpad --enable-crashpad
4 S work       17546   17476  0  80   0 - 543976 futex_ 09:51 ?       00:00:00 /opt/docker-desktop/bin/virtiofsd --socket-path=virtiofs.sock0 -o cache=auto -o source=/home --sandbox=none --announce-submounts
2 S work       17550   17476  4  80   0 - 1102300 do_pol 09:51 ?      00:15:49 qemu-system-x86_64 -accel kvm -cpu host -machine q35 -m 1987 -smp 2 -kernel /opt/docker-desktop/linuxkit/kernel -append page_poison=1 vsyscall=emulate panic=1 nospec_store_bypass_disable noibrs noibpb no_stf_barrier mitigations=off linuxkit.unified_cgroup_hierarchy=1    vpnkit.connect=tcp+bootstrap+client://gateway.docker.internal:36019/6684d4f98fdf26edd4a03089422eb213580a7b4645490043f26ea93647f6c304 vpnkit.disable=osxfs-data console=ttyS0 -initrd /opt/docker-desktop/linuxkit/initrd.img -serial pipe:/tmp/qemu-console806541486/fifo -drive if=none,file=/home/work/.docker/desktop/vms/0/data/Docker.raw,format=raw,id=hd0 -device virtio-blk-pci,drive=hd0,serial=dummyserial -netdev user,id=net0,ipv6=off,net=192.168.65.0/24,dhcpstart=192.168.65.9 -device virtio-net-pci,netdev=net0 -vga none -nographic -monitor none -object memory-backend-memfd,id=mem,size=1987M,share=on -numa node,memdev=mem -chardev socket,id=char0,path=virtiofs.sock0 -device vhost-user-fs-pci,queue-size=1024,chardev=char0,tag=virtiofs0
1 S work       17581   17535  0  80   0 - 4316305 do_pol 09:51 ?      00:00:19 /opt/docker-desktop/Docker Desktop --type=gpu-process --enable-crashpad --enable-crash-reporter=5a529c55-6917-41e8-afdc-86fe74183e59,no_channel --user-data-dir=/home/work/.config/Docker Desktop --gpu-preferences=UAAAAAAAAAAgAAAIAAAAAAAAAAAAAAAAAABgAAAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAABgAAAAAAAAAGAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAACAAAAAAAAAA= --shared-files --field-trial-handle=0,349030070563931175,14136861513003538376,131072 --disable-features=PlzServiceWorker,SpareRendererForSitePerProcess
0 S work       17590   17472  0  80   0 - 4265691 futex_ 09:51 ?      00:00:00 /opt/docker-desktop/Docker Desktop --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-GB --service-sandbox-type=none --enable-crashpad --enable-crash-reporter=5a529c55-6917-41e8-afdc-86fe74183e59,no_channel --user-data-dir=/home/work/.config/Docker Desktop --shared-files=v8_context_snapshot_data:100 --field-trial-handle=0,349030070563931175,14136861513003538376,131072 --disable-features=PlzServiceWorker,SpareRendererForSitePerProcess --enable-crashpad
1 S work       17592   17581  0  80   0 - 4299200 skb_wa 09:51 ?      00:00:00 /opt/docker-desktop/Docker Desktop --type=broker
0 S root       24686   24678  0  80   0 -  4466 pipe_r 15:31 pts/2    00:00:00 grep --color=auto -i docker
root@dockerub:/var/lib# ll /var/lib/docker
ls: cannot access '/var/lib/docker': No such file or directory
root@dockerub:/var/lib# 

答案1

Docker Desktop 与 Docker Engine 不同,并且它运行在KVM虚拟机中,而不是直接在主机上运行。

因此,我遵循了官方在线文档检查卷并通过图形用户界面找到该卷的内容。

数据选项卡显示卷中的文件和文件夹以及文件大小。要保存文件或文件夹,请将鼠标悬停在文件或文件夹上,然后单击更多选项菜单。选择另存为,然后指定下载文件的位置。

相关内容