В контейнерах нет интернета. Так же судя по всему у nginx какие-то проблемы с fpm, если посмотреть в логи, то можно увидеть следующую ошибку:
2020/03/30 15:55:21 [error] 6#6: *4 connect() failed (113: No route to host) while connecting to upstream, client: 10.0.2.2, server: , request: "GET /wpad.dat HTTP/1.1", upstream: "fastcgi://172.18.0.2:9000", host: "wpad.beeline"
Все это крутиться на VirtualBox на CentOS 8, настройки сети следующие:
https://i.imgur.com/apXpS4b.png
nginx/default:
server {
listen 80;
index index.php index.html;
root /app/public;
location / {
try_files $uri /index.php?$args;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass manager-php-fpm:9000;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
}
}
nginx.docker:
FROM nginx:1.17.9-perl
COPY ./nginx/default.conf /etc/nginx/conf.d/default.conf
WORKDIR /app
php-cli.docker:
FROM php:7.4-cli
RUN apt-get update && apt-get install -y unzip
WORKDIR /app
COPY ./ ./
php-fpm.docker
FROM php:7.4-fpm
WORKDIR /app
docker-compose.yml:
version: '3'
services:
manager-nginx:
build:
context: ./manager/docker/development
dockerfile: nginx.docker
volumes:
- ./manager:/app
depends_on:
- manager-php-fpm
ports:
- "80:80"
manager-php-fpm:
build:
context: ./manager/docker/development
dockerfile: php-fpm.docker
volumes:
- ./manager:/app
manager-php-cli:
build:
context: ./manager/docker/development
dockerfile: php-cli.docker
volumes:
- ./manager:/app
Если в php-cli.docker добавить
RUN apt-get update && apt-get install -y unzip
то будет ошибка с пакетным менеджером
Reading package lists...
W: Failed to fetch http://deb.debian.org/debian/dists/buster/InRelease Temporary failure resolving 'deb.debian.org'
W: Failed to fetch http://security.debian.org/debian-security/dists/buster/updates/InRelease Temporary failure resolving 'security.debian.org'
W: Failed to fetch http://deb.debian.org/debian/dists/buster-updates/InRelease Temporary failure resolving 'deb.debian.org'
W: Some index files failed to download. They have been ignored, or old ones used instead.