2

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

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 上运行不畅。

4

1 回答 1

4

使用的图像需要一个/etc/timezone在 Arch Linux 上不使用的目录。

预期/etc/timezone内容示例:

Etc/UTC

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

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

Europe/Zürich
于 2020-02-18T13:50:23.950 回答