我正在使用带有以下 docker-compose 配置块的 caddy 容器:
frontend:
image: zzrot/alpine-caddy
ports:
- "433:433"
- "80:80"
volumes:
- ./share/etc/Caddyfile:/etc/Caddyfile
- ./root/static:/var/www/htm
当我运行 docker-compose up 时,我看到以下错误:
ERROR: oci runtime error: container_linux.go:262: starting container process caused "process_linux.go:339: container init caused \"rootfs_linux.go:57: mounting \\\"/Users/adam/code/projects/BicycleEvents-Web/share/etc/Caddyfile\\\" to rootfs \\\"/var/lib/docker/aufs/mnt/9e45393ec987dcca75752736c2b4af323ce78838b4d9233059e4d24c6ada193a\\\" at \\\"/var/lib/docker/aufs/mnt/9e45393ec987dcca75752736c2b4af323ce78838b4d9233059e4d24c6ada193a/etc/Caddyfile\\\" caused \\\"not a directory\\\"\""
: 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
这在前一段时间还有效,但我最近升级了 docker-machine 并尝试重建容器。
码头机器版本:docker-machine version 0.12.1, build c8b17e8
码头工人撰写版本:
1.6.0, build d99cad6
docker-py version: 1.7.0
CPython version: 2.7.11
OpenSSL version: OpenSSL 0.9.8zh 14 Jan 2016
码头工人版本:
Client:
Version: 1.10.1
API version: 1.22
Go version: go1.5.3
Git commit: 9e83765
Built: Thu Feb 11 19:14:21 2016
OS/Arch: darwin/amd64
Server:
Version: 17.06.0-ce
API version: 1.30
Go version: go1.8.3
Git commit: 02c1d87
Built: Fri Jun 23 21:19:04 2017
OS/Arch: linux/amd64