############################################################
extension: mysql、mongo、compose: https://mirrors.aliyun.com/composer/
############################################################
FROM php:7-fpm
USER root RUN useradd --create-home --no-log-init --shell /bin/bash lewis
RUN apt-get update && apt-get install -y
&& apt-get install libzip-dev -y
&& docker-php-ext-install zip
&& docker-php-ext-enable zip
&& apt-get autoremove -y
&& apt-get clean
&& rm -rf /var/lib/apt/lists/*
RUN apt-get update
&& apt-get install -y iputils-ping
&& docker-php-ext-install mysqli && docker-php-ext-enable mysqli
RUN pecl install mongodb RUN docker-php-ext-enable mongodb
RUN apt-get update
&& apt-get install curl
&& curl -sS https://getcomposer.org/installer | php
&& mv composer.phar /usr/local/bin/composer
USER lewis WORKDIR /var/www/html
RUN /usr/local/bin/composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/