Code Monkey home page Code Monkey logo

phpdocker's Introduction

leonardolana/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 leonardolana/phpdocker:5.6.

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.

phpdocker's People

Contributors

hranicka avatar leolana avatar

Watchers

James Cloos avatar  avatar

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.