这是一个创建于 2575 天前的主题,其中的信息可能已经有所发展或是发生改变。
错误提示
[ERROR 502 /test.php] dial tcp 127.0.0.1:9000: getsockopt: connection refused
docker-compose.yml
version: "2"
services:
caddy:
image: abiosoft/caddy
container_name: 'caddy-web-server'
ports:
- 80:80
- 443:443
- 2015:2015
volumes:
- /work/docker/Caddyfile:/etc/Caddyfile
- /work/.caddy:/root/.caddy
- /work/:/srv
links:
- db
- php
db:
image: mariadb
container_name: mariadb
volumes:
- /work/docker/mariaDb/path:/var/lib/mysql
ports:
- 3306:3306
environment:
- MYSQL_ROOT_PASSWORD=123456
php:
image: cespi/php-5.3:modules-fpm-latest
container_name: php
ports:
- 9000:9000
volumes:
- /work/:/var/www/html
links:
- db
Caddyfile
0.0.0.0:80
root /var/www/html
gzip
log stdout
errors stdout
fastcgi / 127.0.0.1:9000 php
2 条回复 • 2017-11-12 18:06:08 +08:00
|
|
1
goofansu 2017-11-12 17:39:03 +08:00 via Android
容器互相访问要用名字,比如 php:9000
|
|
|
2
sarices 2017-11-12 18:06:08 +08:00
|