Answer the question
In order to leave comments, you need to log in
How to work with docker and apache?
The question arose that you need to deal with apache, php and docker to the heap. None of this has been touched before. Launched Docker, installed apache, php, mysql image, nginx has yet to be installed. But I fundamentally can not understand how to work with them now. How to change apache config? Why doesn't apache respond to the index.php file in volumes? Below is the docker-compose file I found on the internet. Can someone describe in general the procedure, at least approximately? Thank you.
PS before that, I just put apache into the system, but deleted it, I don’t know how good it turned out.
version: "2"
services:
php:
build:
context: './php/'
args:
PHP_VERSION: ${PHP_VERSION}
networks:
- backend
volumes:
- ./public_html/:/var/www/html/
- ./php/php.ini:/usr/local/etc/php/php.ini
container_name: php
apache:
build:
context: './apache/'
args:
APACHE_VERSION: ${APACHE_VERSION}
depends_on:
- php
- mysql
networks:
- frontend
- backend
ports:
- "80:80"
volumes:
- ./src:/var/www/html
container_name: apache
mysql:
image: mysql:5.6.26
networks:
- backend
environment:
- MYSQL_ROOT_PASSWORD=rootpassword
container_name: mysql
networks:
frontend:
backend:
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question