GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - darh/php-essentials: Docker container for PHP5, composer, phpunit, phpcpd, phpdcd, phploc, pdepend, ...

BranchesTags
Open more actions menu

Latest commit

 

History

10 Commits
10 Commits

Folders and files

NameName
Last commit message
Last commit date
test
test
 
 
Dockerfile
Dockerfile
 
 
LICENCE
LICENCE
 
 
README.md
README.md
 
 
essentials.ini
essentials.ini
 
 
essentials.sh
essentials.sh
 
 
test.sh
test.sh
 
 

Repository files navigation

PHP essentials

Welcome to PHP essentials Docker container.

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

  • PHP 5.5.* (ondrej's repos)
  • Composer
  • Pear
  • PHPUnit 3.7
  • PHP Copy/Paste Detector - phpcpd
  • PHP Dead Code Detector - phpdcd
  • Measuring the size and analyzing the structure of a PHP project - phploc
  • PHP software metrics - pdepend
  • PHP Code sniffer- phpcs
  • PHP Mess Detector - phpmd
  • Behaviour driven development for PHP - behat

Get it

docker pull darh/php-essentials

Run it

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

docker run --rm -i -t darh/php-essentials

Docker's run command reference manual

See enabled modules, settings:

docker run --rm -i -t darh/php-essentials php -m
docker run --rm -i -t darh/php-essentials php -i

Run PHP's internal server

(a totally useless example)

docker run --publish 80:80 --rm -t -i darh/php-essentials \
  php -S 0.0.0.0:80

The tools:

docker run --rm -i -t darh/php-essentials composer
docker run --rm -i -t darh/php-essentials pear
docker run --rm -i -t darh/php-essentials phpunit
docker run --rm -i -t darh/php-essentials phpcpd
docker run --rm -i -t darh/php-essentials phpdcd
docker run --rm -i -t darh/php-essentials phploc
docker run --rm -i -t darh/php-essentials pdepend
docker run --rm -i -t darh/php-essentials phpcs
docker run --rm -i -t darh/php-essentials phpmd
docker run --rm -i -t darh/php-essentials 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 darh/php-essentials \
  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 darh/php-essentials .

Bash

docker run --rm -i -t darh/php-essentials bash

About

Docker container for PHP5, composer, phpunit, phpcpd, phpdcd, phploc, pdepend, ...

index.docker.io/u/darh/php-essentials/

Resources

Readme
Apache-2.0 license
Activity

Stars

37 stars

Watchers

2 watching

Forks

4 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.