繁体   English   中英

Docker 无法将目录识别为 Arch Linux 中的目录

[英]Docker is not recognizing a directory as directory in Arch Linux

基本上,当我尝试创建容器时出现此错误:

docker: Error response from daemon: OCI runtime create failed: container_linux.go:337: starting container process caused "process_linux.go:403: container init caused \"rootfs_linux.go:58: mounting \\\"/etc/timezone\\\" to rootfs \\\"/var/lib/docker/overlay2/8864cea6615c7c165fce558661bf297c43ebf90f4de534ca9c9bd38f7af8b487/merged\\\" at \\\"/var/lib/docker/overlay2/8864cea6615c7c165fce558661bf297c43ebf90f4de534ca9c9bd38f7af8b487/merged/etc/timezone\\\" 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.

不知道为什么会这样。 它在 Manjaro 上运行完美,但在 Arch Labs 上运行不佳。

所使用的图像需要一个位于/etc/timezone的目录,而 Arch Linux 上并未使用该目录。

预期的/etc/timezone内容示例:

Etc/UTC

只需从您的命令或 docker-compose 文件中删除该绑定挂载。 您需要在容器中以不同方式设置时区,或者找到一种方法使/etc/timezone文件与/etc/localtime保持同步。

我猜/etc/timezone是 Solaris 和 Debian 的东西。 它期望时区成对

Europe/Zürich

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM