Skip to content

Instantly share code, notes, and snippets.

@jk
Created July 14, 2016 15:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jk/837d9ce6dddd010cb64f0a0ba8bcfaf9 to your computer and use it in GitHub Desktop.
Save jk/837d9ce6dddd010cb64f0a0ba8bcfaf9 to your computer and use it in GitHub Desktop.
PHP 5.6 dockerfile with composer preinstalled globally as `composer`
FROM php:5.6
MAINTAINER Jens Kohl <jens.kohl@milchundzucker.de>
RUN apt-get update && apt-get install -y \
git-core \
unzip \
rsync \
ssh-client \
--no-install-recommends && apt-get clean
RUN set -xe \
&& php -v \
&& cd /tmp \
&& php -r "readfile('https://getcomposer.org/installer');" > composer-setup.php \
&& php composer-setup.php \
&& php -r "unlink('composer-setup.php');" \
&& mv composer.phar /usr/local/bin/composer \
&& which composer \
&& composer --version
CMD ["php", "-a"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment