Last year https://blog.deleu.dev/phpunit-with-bref/. I start with the docker-compose.yaml file which contains the configuration necessary to start a brand new container with my source code. version: '3.7' services: phpunit: build: context: php/build entrypoint: /usr/bin/tail command: ["-f", "/dev/null"] user: root working_dir: /var/task volumes: -.:/var/task -./php/build:/root/build -./tests/bref.ini:/opt/bref/etc/php/conf.d/bref.ini environment: - APP_ENV=testing
The source code has to be mounted on /var/task as it's where AWS place the source code on Lambda.