Build docker container with php 8 and jit for tests.
- Download existing image and run bench.php in it:
docker-compose -f docker-compose-fast.yml up
Create a container with custom extensions and development webserver.
- Build
docker-compose build - Start container in background
docker-compose up -d - Connect
bash docker-exec.sh - Run
php bench.php - Disable jit or opcache in
/usr/local/etc/php/conf.d/opcache.inito see performance difference. - Test other projects:
- Link other projects in the container:
- Add links to projects in docker-compose.yml. Change
volumesandworkdirdirectives. - Entrypoint command
php -Swill start in workdir. Can be replaced withphp artisan servefor laravel projects, for example. - Rebuild and restart container:
docker-compose down && docker-compose up -d
- Add links to projects in docker-compose.yml. Change
- Create files in the current folder. They will be immediately available in the container.
- Link other projects in the container:
- Check in a browser:
http://127.0.0.1:8000 - Remove container and images after tests:
docker-compose down && docker system prune