Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
FROM php:7.2-fpm-stretch
# needed PHAN and ast ext so I found this and copied some stuff https://github.com/mre/docker-php-phan
RUN DEBIAN_FRONTEND=noninteractive \
&& apt-get update \
&& apt-get install -y unzip git curl
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
# DEPS
RUN git clone https://github.com/nikic/php-ast.git \
&& cd php-ast \
&& phpize \
&& ./configure \
&& make install \
&& echo 'extension=ast.so' > /usr/local/etc/php/php.ini \
&& cd .. && rm -rf php-ast
RUN git clone https://github.com/etsy/phan.git \
&& cd phan \
&& composer install \
&& ./test \
&& chmod a+x phan \
&& ln -s /phan/phan /usr/local/bin/phan
RUN docker-php-ext-install mysqli && \
docker-php-ext-install pdo_mysql
RUN apt-get update -y && apt-get install -y libicu-dev \
&& docker-php-ext-configure intl \
&& docker-php-ext-install intl
# DEV
RUN pecl install xdebug
RUN docker-php-ext-install pcntl
# Clean up
RUN apt-get clean && rm -rf /tmp/*
ADD symfony.ini /etc/php7/php-fpm.d/
ADD symfony.ini /etc/php7/cli/conf.d/
ADD xdebug.ini /etc/php7/conf.d/
ADD symfony.pool.conf /etc/php7/php-fpm.d/
CMD ["php-fpm", "-F"]
WORKDIR /var/www/symfony
EXPOSE 9001
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.