Содержимое файла "docker-compose.yaml"
version: '3'
services:
apache:
container_name: apache
build:
dockerfile: ./.docker/apache2/Dockerfile
context: ./../
restart: always
platform: linux/amd64
volumes:
- ./../:/var/www/html
- ./apache2/certs/apache-selfsigned.crt:/etc/ssl/certs/apache-selfsigned.crt
- ./apache2/certs/apache-selfsigned.key:/etc/ssl/private/apache-selfsigned.key
- ./apache2/httpd.conf:/etc/apache2/apache2.conf
env_file:
- ./.env
ports:
- 8081:80
networks:
- ${PROJECT_NAME}
php:
container_name: php
build:
dockerfile: /.docker/php/Dockerfile
context: ./../
restart: always
platform: linux/amd64
env_file:
- ./.env
volumes:
- .:/var/www/html
networks:
- ${PROJECT_NAME}
phpmyadmin:
container_name: phpmyadmin
image: phpmyadmin/phpmyadmin:latest
ports:
- 5042:80
restart: always
links:
- mysql
environment:
MYSQL_ROOT_PASSWORD: root
PMA_HOST: ${PROJECT_NAME}-mysql
PMA_USER: root
PMA_PASSWORD: root
UPLOAD_LIMIT: 256M
networks:
- ${PROJECT_NAME}
mysql:
image: mysql:latest
container_name: mysql
hostname: ${PROJECT_NAME}-mysql
restart: unless-stopped
env_file:
- ./.env
volumes:
- ./mysql:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_PASSWORD: root
MYSQL_DATABASE: dev-${PROJECT_NAME}
networks:
- ${PROJECT_NAME}
redis:
container_name: redis
restart: always
image: redis:latest
platform: linux/amd64
hostname: ${PROJECT_NAME}-redis
environment:
- REDIS_PORT=6379
- REDIS_DATABASES=1
networks:
- ${PROJECT_NAME}
networks:
framework:
name: ${PROJECT_NAME}
Dockerfile PHP
FROM php:7.4-apache
RUN docker-php-ext-install pdo_mysql
С помощью phpinfo показывает версию "8.3.6", почему?