有什么想法吗?
这个服务以前是可以启动的,但现在我收到了“/etc/Caddyfile: is a directory”这个消息并且服务退出了。
$ docker-compose -f docker-compose-linux.yml up caddy
Starting server_applications_1 ... done
server_workspace_1 is up-to-date
server_php-fpm_1 is up-to-date
Starting server_caddy_1 ... done
Attaching to server_caddy_1
caddy_1 | http plugins loaded: git
caddy_1 | 2020/06/22 06:22:18 loading Caddyfile via flag: read /etc/Caddyfile: is a directory
server_caddy_1 exited with code 1
关于 caddy 服务的 Dockerfile:
FROM zuohuadong/caddy:alpine
MAINTAINER Huadong Zuo <admin@zuohuadong.cn>
ARG plugins="cors"
WORKDIR /var/www/platform/public
CMD ["/usr/bin/caddy", "-conf", "/etc/Caddyfile"]
Caddy服务容器的yml文件: 其中CADDY_CUSTOM_CADDYFILE=./caddy/Caddyfile
volumes: - ${CADDY_CUSTOM_CADDYFILE}:/etc/Caddyfile
Caddyfile在正确的目录中
...server/caddy$ ll
total 16
drwxrwxr-x 2 ubuntu ubuntu 4096 Jun 22 17:44 ./
drwxrwxr-x 11 ubuntu ubuntu 4096 Jun 22 15:55 ../
-rw-r--r-- 1 ubuntu ubuntu 1452 Jun 11 10:54 Caddyfile
-rw-r--r-- 1 ubuntu ubuntu 268 Jun 22 18:13 Dockerfile
$ docker-compose -f docker-compose-linux.yml up caddy
开始启动 server_applications_1 ... 完成 server_workspace_1 已经是最新的 server_php-fpm_1 已经是最新的 正在启动 server_caddy_1 ... 完成 附加到 server_caddy_1 caddy_1 | 已加载 http 插件: git caddy_1 | 2020/06/22 06:22:18 通过标志加载 Caddyfile: 读取 /etc/Caddyfile: 是一个目录 server_caddy_1 退出,返回代码 1