Skip to content

Docker PHP 5.6 build tools (phpmd, phpcs, phploc, phpunit, phpcpd, phpdcd, pdepend, behat)

Notifications You must be signed in to change notification settings

denisristic/dockerphp56buildtools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PHP 5.6 Build Tools

Welcome to PHP5.6BuildTools container.

This image updated version from PHPEssentials.

Main purpuse of this container is to provide easy to use PHP CLI and other essential tools for debuging and testing your PHP applications.

Contents

Get it

docker pull denisristic/php5.6buildtools

Run it

Container is give you PHP's interactive mode by default:

docker run --rm -i -t denisristic/php5.6buildtools

Docker's run command reference manual

See enabled modules, settings:

docker run --rm -i -t denisristic/php5.6buildtools php -m
docker run --rm -i -t denisristic/php5.6buildtools php -i

Run PHP's internal server (a totally useless example)

docker run --publish 80:80 --rm -t -i denisristic/php5.6buildtools \
  php -S 0.0.0.0:80

The tools:

docker run --rm -i -t denisristic/php5.6buildtools composer
docker run --rm -i -t denisristic/php5.6buildtools pear
docker run --rm -i -t denisristic/php5.6buildtools phpunit
docker run --rm -i -t denisristic/php5.6buildtools phpcpd
docker run --rm -i -t denisristic/php5.6buildtools phpdcd
docker run --rm -i -t denisristic/php5.6buildtools phploc
docker run --rm -i -t denisristic/php5.6buildtools pdepend
docker run --rm -i -t denisristic/php5.6buildtools phpcs
docker run --rm -i -t denisristic/php5.6buildtools phpmd
docker run --rm -i -t denisristic/php5.6buildtools behat

Please note, that running things like composer autoupdate is futile as container & it's content will be removed when command finishes. If there's a newer version add an issue on Github or rebuild the php-essentials image yourself.

Use it

All above example are useless as presented as the code runs in the container and none of the examples actualy maps local files to the container:

A bit more usefull example -- adding volume param that maps the current folder and hinting PHP server where it's document root is

docker run --volume `pwd`:/opt/web/page:r --publish 80:80 --rm -t -i denisristic/php5.6buildtools \
  php -S 0.0.0.0:80 -t /opt/web/page

Do you want to run this long chain every time?

Solving local/host-remote/container issue with some quick shell scripting

Include essentials.sh file (or it's contents) to bashrc or similar file. This will enable you to run all these commands as if they were installed on your local machine


Build it

In case you want to build it yourself

docker build --rm -t denisristic/php5.6buildtools .

Bash

docker run --rm -i -t denisristic/php5.6buildtools bash

About

Docker PHP 5.6 build tools (phpmd, phpcs, phploc, phpunit, phpcpd, phpdcd, pdepend, behat)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published