Skip to content

Files

Latest commit

0da6c52 · May 22, 2023

History

History
39 lines (32 loc) · 997 Bytes

README.md

File metadata and controls

39 lines (32 loc) · 997 Bytes

codewars

Great for learning and sharpening your coding skillz.

Build PHP 8.0 Docker image

Use the build script in order to build the custom PHP 8.0 Docker image andrerademacher/codewars-php80.

container/build.sh

Run command in container

The container.sh script makes running commands in the Docker container easy! To open a shell, just add the "sh" command:

container.sh sh

The current PHP version can be shown like this:

container.sh php --version

The Composer binary is already present in the latest version supporting PHP 8.0 . To run any composer command, like composer install, just type:

container.sh composer install

After installing the dev dependencies, the PHPUnit test suite can be run inside the container by calling the phpunit binary in the vendor directory:

container.sh vendor/bin/phpunit

For convenience, this can be done also by using the composer script:

container.sh composer phpunit