Created
September 8, 2017 14:10
-
-
Save radu-matei/23b710175ad594d7b8014de98331751e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM php:7.0.6-apache | |
MAINTAINER Azure App Services Container Images <[email protected]> | |
COPY apache2.conf /bin/ | |
COPY init_container.sh /bin/ | |
COPY hostingstart.html /home/site/wwwroot/hostingstart.html | |
RUN a2enmod rewrite expires include | |
# install the PHP extensions we need | |
RUN apt-get update \ | |
&& apt-get install -y --no-install-recommends \ | |
libpng12-dev \ | |
libjpeg-dev \ | |
libpq-dev \ | |
libmcrypt-dev \ | |
libldap2-dev \ | |
libldb-dev \ | |
libicu-dev \ | |
libgmp-dev \ | |
libmagickwand-dev \ | |
openssh-server vim curl wget tcptraceroute \ | |
&& chmod 755 /bin/init_container.sh \ | |
&& echo "root:Docker!" | chpasswd \ | |
&& ln -s /usr/lib/x86_64-linux-gnu/libldap.so /usr/lib/libldap.so \ | |
&& ln -s /usr/lib/x86_64-linux-gnu/liblber.so /usr/lib/liblber.so \ | |
&& ln -s /usr/include/x86_64-linux-gnu/gmp.h /usr/include/gmp.h \ | |
&& rm -rf /var/lib/apt/lists/* \ | |
&& pecl install imagick-beta \ | |
&& docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr \ | |
&& docker-php-ext-install gd \ | |
mysqli \ | |
opcache \ | |
pdo \ | |
pdo_mysql \ | |
pdo_pgsql \ | |
pgsql \ | |
ldap \ | |
intl \ | |
mcrypt \ | |
gmp \ | |
zip \ | |
bcmath \ | |
mbstring \ | |
pcntl \ | |
&& docker-php-ext-enable imagick | |
RUN \ | |
rm -f /var/log/apache2/* \ | |
&& rmdir /var/lock/apache2 \ | |
&& rmdir /var/run/apache2 \ | |
&& rmdir /var/log/apache2 \ | |
&& chmod 777 /var/log \ | |
&& chmod 777 /var/run \ | |
&& chmod 777 /var/lock \ | |
&& chmod 777 /bin/init_container.sh \ | |
&& cp /bin/apache2.conf /etc/apache2/apache2.conf \ | |
&& rm -rf /var/www/html \ | |
&& rm -rf /var/log/apache2 \ | |
&& mkdir -p /home/LogFiles \ | |
&& ln -s /home/site/wwwroot /var/www/html \ | |
&& ln -s /home/LogFiles /var/log/apache2 | |
RUN { \ | |
echo 'opcache.memory_consumption=128'; \ | |
echo 'opcache.interned_strings_buffer=8'; \ | |
echo 'opcache.max_accelerated_files=4000'; \ | |
echo 'opcache.revalidate_freq=60'; \ | |
echo 'opcache.fast_shutdown=1'; \ | |
echo 'opcache.enable_cli=1'; \ | |
} > /usr/local/etc/php/conf.d/opcache-recommended.ini | |
RUN { \ | |
echo 'error_log=/var/log/apache2/php-error.log'; \ | |
echo 'display_errors=Off'; \ | |
echo 'log_errors=On'; \ | |
echo 'display_startup_errors=Off'; \ | |
echo 'date.timezone=UTC'; \ | |
} > /usr/local/etc/php/conf.d/php.ini | |
COPY sshd_config /etc/ssh/ | |
EXPOSE 2222 8080 | |
ENV APACHE_RUN_USER www-data | |
ENV PHP_VERSION 7.0.6 | |
ENV PORT 8080 | |
ENV WEBSITE_ROLE_INSTANCE_ID localRoleInstance | |
ENV WEBSITE_INSTANCE_ID localInstance | |
ENV PATH ${PATH}:/home/site/wwwroot | |
WORKDIR /var/www/html | |
COPY app . | |
ENTRYPOINT ["/bin/init_container.sh"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment