I'm trying to setup a sympony 3.4 project in docker using apache, but it doesn't work, the werser works but no t with the symfony project
this is the Dockerfile
FROM php:7.4.2-apache
RUN pecl install xdebug && docker-php-ext-enable xdebug \
# not yet in linux: xdebug.remote_host = host.docker.internal \n\
&& echo "\n\
xdebug.mode = debug \n\
xdebug.start_with_request = yes \n\
xdebug.client_port = 9003 \n\
xdebug.client_host = host.docker.internal \n\
xdebug.log = "C:\xdebug_log\xdebug.log" \n\
xdebug.idekey = VSCODE \n\
" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
and the dockercompose.yml
version: "3.7"
services:
apache_with_php:
build: .
container_name: php74_apache
volumes:
- ./:/var/www/html/
ports:
- "80:80"
memcached:
image: memcached:alpine
container_name: memcached
mailhog:
image: mailhog/mailhog:latest
container_name: mailhog
ports:
- "1026:8025"
redis:
image: redis:alpine
container_name: redis
mariadb:
image: mariadb:10.4
container_name: mariadb
working_dir: /application
volumes:
- .:/application
environment:
- MYSQL_ROOT_PASSWORD=mypass
- MYSQL_DATABASE=mydb
- MYSQL_USER=myuser
- MYSQL_PASSWORD=mypass
ports:
- "1028:3306"
How I could set a virtual host inside the docker container?