A docker stack with dnsmasq
, php-7.4
, php-8ss.0
, php-8.1
, mysql
, redis
and mailhog
. This will mount the parent folder of this project and make it available for all PHP versions. You can easily add more PHP versions in docker-compose.yml
.
If you have the following project structure:
.
└── projects
├── laravel-docker-dev
├── project1
└── project2
Then the following domains will be available: project1.php74.loc
, project1.php80.loc
, project2.php74.loc
, project2.php80.loc
, etc...
Edit /etc/systemd/resolved.conf
and append:
DNS=127.0.0.2
Domains=loc
docker-compose up -d --build