Public | Automated Build

Last pushed: 14 days ago
Short Description
Forked from RobLoach/docker-composer. Add more PHP Image Variants.
Full Description

Supported tags and respective Dockerfile links

  • 1.0
  • 1.0-alpine
  • 1.0-apache
  • 1.0-fpm
  • 1.0-fpm-alpine
  • 1.0-php5
  • 1.0-php5-alpine
  • 1.0-php5-apache
  • 1.0-php5-fpm
  • 1.0-php5-fpm-alpine
  • 1.1, 1, latest
  • 1.1-alpine, 1-alpine, alpine
  • 1.1-apache, 1-apache, apache
  • 1.1-fpm, 1-fpm, fpm
  • 1.1-fpm-alpine, 1-fpm-alpine, fpm-alpine
  • 1.1-php5, 1-php5, php5
  • 1.1-php5-alpine, 1-php5-alpine, php5-alpine
  • 1.1-php5-apache, 1-php5-apache, php5-apache
  • 1.1-php5-fpm, 1-php5-fpm, php5-fpm
  • 1.1-php5-fpm-alpine, 1-php5-fpm-alpine, php5-fpm-alpine
  • master
  • master-alpine
  • master-apache
  • master-fpm
  • master-fpm-alpine
  • master-php5
  • master-php5-alpine
  • master-php5-apache
  • master-php5-fpm
  • master-php5-fpm-alpine

What is Composer?

Composer is a tool for dependency management in PHP. It allows you to declare the libraries your project depends on and it will manage (install/update) them for you.

Forked from RobLoach/docker-composer (software))

How to use this image.

Installation / Usage

  1. Install the kennytang/composer container:

     $ docker pull kennytang/composer

    Alternatively, pull a specific version of kennytang/composer:

     $ docker pull kennytang/composer:1.1
  2. Create a composer.json defining your dependencies. Note that this example is
    a short version for applications that are not meant to be published as packages
    themselves. To create libraries/packages please read the

         "require": {
             "monolog/monolog": ">=1.0.0"
  3. Run Composer through the Composer container:

     $ docker run --rm -v $(pwd):/app kennytang/composer install

    Or run using a specific version of Composer:

     $ docker run --rm -v $(pwd):/app kennytang/composer:1.1 install

    If working with packages installed via git ssh the local .ssh directory shall be mapped into the container:

     $ docker run --rm -v $(pwd):/app -v ~/.ssh:/root/.ssh kennytang/composer install
  4. Add optional composer command to the host (tested on OS X El Capitan with docker-machine)

    Create new composer file

     $ sudo vim /usr/local/bin/composer

    The contents of the file will look like this:

     export PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin
     echo "Current working directory: '"$(pwd)"'"
     docker run --rm -v $(pwd):/app -v ~/.ssh:/root/.ssh kennytang/composer $@

    Once the script has been made, it must be set as executable

     $ sudo chmod +x /usr/local/bin/composer

    Now the composer command is available native on host:

     $ composer --version

Image Variants

Please refer to the PHP Image Variants on Docker Hub.

Docker Pull Command
Source Repository