【问题标题】:Docker on VM stoped working fine after shutdownVM 上的 Docker 在关机后停止正常工作
【发布时间】:2019-07-15 10:24:56
【问题描述】:

我正在使用沙盒 hdp ambari、nifi 开发虚拟机。 我需要更多空间,所以我在 mymachine.vdi 上调整了大小,但要看到调整大小并为分区分配更多空间,我必须关闭机器。

当我再次启动它时,“docker start sandbox-proxy”给出指定的错误。

我正在尝试启动 sandbox-hdp、sandbox-proxy 和 mysql。 启动 sandbox-hdp 工作正常,但是当我尝试启动 sandbox-proxy 时,docker 给了我这个错误:

sudo docker start sandbox-proxy
Error response from daemon: OCI runtime create failed: container_linux.go:345: starting container process caused "process_linux.go:430: container init caused \"rootfs_linux.go:58: mounting \\\"/home/ubuntu/Descargas/scripts/assets/nginx.conf\\\" to rootfs \\\"/var/lib/docker/overlay2/ebbbe053a9670b801ef0119f4502630a618268fe87c586d2cd2cb8423142d737/merged\\\" at \\\"/var/lib/docker/overlay2/ebbbe053a9670b801ef0119f4502630a618268fe87c586d2cd2cb8423142d737/merged/etc/nginx/nginx.conf\\\" caused \\\"not a directory\\\"\"": unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type
Error: failed to start containers: sandbox-proxy

【问题讨论】:

    标签: docker daemon sandbox


    【解决方案1】:

    从错误看来,您正在尝试将目录挂载到文件上。

    请转至this。

    你需要:

    • 检查守护进程主机上是否存在文件/home/ubuntu/Descargas/scripts/assets/nginx.conf。
    • 如果它不存在,docker 现在在上面的路径中创建了一个目录;删除该目录并将其替换为您尝试挂载的文件
    • 您也可以使用--mount 标志代替-v / --volume:如果缺少主机路径,--mount 标志将不会自动创建目录,而是会产生错误,以便您'知道主机上的路径(文件/目录)丢失。

    希望对你有帮助。

    【讨论】:

    • 它仍然没有帮助。
    猜你喜欢
    • 2022-10-05
    • 2017-06-27
    • 2015-01-07
    • 2021-02-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多