Code Monkey home page Code Monkey logo

php-essentials's Introduction

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

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

php-essentials's People

Contributors

chieftainy2k avatar darh avatar tanarurkerem avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

php-essentials's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.