Skip to content

forgie1/phpdocker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

80 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

phpdocker/phpdocker

Usage

  • Docker image is available at Docker Hub.
  • The primary goal of this Docker image is custom image for CI, but you can obviously use it like you want.

Example

Tags

  • Tags depend on version of PHP included.
  • They are given by git branches.
  • You can see them at Docker Hub.

Available Bash scripts

This performs a HTTP Request and checks returned status code.

Returns non-zero exit code when status is not 200 (OK).

Usage: URL="https://www.example.com" check-status-code

Returns non-zero exit code when status is not 403 (Forbidden).

Usage: URL="https://www.example.com" STATUS=403 check-status-code

Built-in applications

PHP

  • PHP is started automatically.
  • You can type PHP commands, eg. php -r "echo 1;".
  • Each Docker image contains ONLY ONE VERSION OF PHP, so:
    • If you need PHP 5.6, use phpdocker/phpdocker:5.6.
    • If you need PHP 7.0, use phpdocker/phpdocker:7.0.

MariaDB

  • MariaDB is not started automatically.
  • Type service mysql start if you want start it.
  • Then you can work with DB, eg. mysql -e 'create database test;'.
  • Default mysql user is root without password.

Redis

  • Redis is not started automatically.
  • Type service redis-server start if you want start it.
  • Then you can work with DB, eg. redis-cli ping.

Composer

  • Composer is installed globally.
  • You can run it, eg. composer self-update.

PHP_CodeSniffer

  • PHP_CodeSniffer is installed globally.
  • You can run it, eg. phpcs --standard=PSR2 -nsp src tests.

PHPUnit

  • PHPUnit is installed globally.
  • You can run it, eg. phpunit --log-junit shippable/testresults/junit.xml --coverage-xml shippable/codecoverage -c tests/configuration.xml tests.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages