Great for learning and sharpening your coding skillz.
Use the build script in order to build the custom PHP 7.0 Docker image
andrerademacher/codewars-php70
.
container/build.sh
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 2.2 LTS version supporting PHP 7.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