Skip to content

Instantly share code, notes, and snippets.

@jakzal
Created March 5, 2015 11:29
Show Gist options
  • Save jakzal/fb52e4d138db639533cc to your computer and use it in GitHub Desktop.
Save jakzal/fb52e4d138db639533cc to your computer and use it in GitHub Desktop.
Symfony in Docker
#!/bin/sh
docker build -t symfony/php --rm tools/docker/
docker run --name symfony_php --rm -v $(pwd):/symfony -ti symfony/php "$*"
# tools/docker/Dockerfile
FROM php:5.6-cli
VOLUME /symfony
WORKDIR /symfony
ENV COMPOSER_HOME=/usr/local/composer
ENV PATH /usr/local/composer/vendor/bin:$PATH
COPY php.ini /usr/local/etc/php/php.ini
RUN apt-get update && apt-get install -y \
git \
unzip
RUN curl -sS https://getcomposer.org/installer | php -- --filename=composer --install-dir=/usr/local/bin
RUN composer global require phpunit/phpunit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment