Created
October 17, 2020 02:49
-
-
Save hughshen/ad74fb8f1c5275a016d036cad1ca73f4 to your computer and use it in GitHub Desktop.
This file contains hidden or 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.3-apache | |
RUN sed -i 's/deb.debian.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apt/sources.list | |
RUN sed -i 's/security.debian.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apt/sources.list | |
RUN apt-get update && apt-get install -y \ | |
curl \ | |
git \ | |
zip \ | |
unzip \ | |
libfreetype6-dev \ | |
libjpeg62-turbo-dev \ | |
libpng-dev \ | |
zlib1g-dev \ | |
libzip-dev \ | |
libssl-dev \ | |
libmagick++-dev \ | |
libmagickwand-dev \ | |
&& docker-php-ext-configure gd --with-freetype-dir=/usr --with-jpeg-dir=/usr --with-png-dir=/usr \ | |
&& docker-php-ext-configure zip --with-libzip \ | |
&& docker-php-ext-install -j$(nproc) gd \ | |
&& docker-php-ext-install mbstring pdo pdo_mysql bcmath intl mysqli zip json iconv sockets tokenizer fileinfo opcache xml exif soap ftp ctype \ | |
&& pecl install imagick-3.4.3 \ | |
&& docker-php-ext-enable imagick | |
# composer | |
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer | |
# Clear cache | |
RUN apt-get clean; rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/* | |
WORKDIR /var/www/html | |
RUN a2enmod rewrite | |
RUN a2enmod ssl | |
EXPOSE 80 | |
EXPOSE 443 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment