-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix error in docker-compose, reduce container size
- Loading branch information
Showing
5 changed files
with
79 additions
and
60 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,16 @@ | ||
FROM php:5-apache | ||
RUN apt-get update && apt-get -y install libmcrypt-dev libicu-dev wget mysql-client msmtp libpng-dev libjpeg-dev libfreetype6-dev libxpm-dev libvpx-dev && apt-get clean | ||
RUN docker-php-ext-install pdo_mysql | ||
RUN docker-php-ext-install mcrypt | ||
RUN docker-php-ext-install opcache | ||
RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ --with-xpm-dir=/usr/include/ --with-vpx-dir=/usr/include/ | ||
RUN docker-php-ext-install gd | ||
RUN wget https://github.com/composer/composer/releases/download/1.8.6/composer.phar -O /usr/local/bin/composer && chmod +x /usr/local/bin/composer | ||
RUN docker-php-ext-install mysql | ||
RUN docker-php-ext-install zip | ||
FROM php:5.6-apache | ||
RUN apt-get update && \ | ||
apt-get -y install libmcrypt-dev libicu-dev wget mysql-client msmtp libpng-dev libjpeg-dev libfreetype6-dev libxpm-dev libvpx-dev && \ | ||
docker-php-ext-install pdo_mysql && \ | ||
docker-php-ext-install mcrypt && \ | ||
docker-php-ext-install opcache && \ | ||
docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ --with-xpm-dir=/usr/include/ --with-vpx-dir=/usr/include/ && \ | ||
docker-php-ext-install gd && \ | ||
docker-php-ext-install mysql && \ | ||
docker-php-ext-install zip && \ | ||
apt-get remove -y libmcrypt-dev libicu-dev libpng-dev libjpeg-dev libfreetype6-dev libxpm-dev libvpx-dev gcc gcc-6 && \ | ||
apt-get autoremove -y && apt-get clean && rm -rf /usr/src/* | ||
|
||
RUN (cd /etc/apache2/mods-enabled && ln -s ../mods-available/rewrite.load .) | ||
#RUN usermod -u 1050 www-data && groupmod -g 1050 www-data | ||
RUN wget https://github.com/composer/composer/releases/download/1.8.6/composer.phar -O /usr/local/bin/composer && chmod +x /usr/local/bin/composer | ||
#RUN usermod -u 1050 www-data && groupmod -g 1050 www-data |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,16 @@ | ||
FROM php:7.1-apache | ||
RUN apt-get update && apt-get -y install libmcrypt-dev libicu-dev libpng-dev libjpeg-dev libfreetype6-dev libxpm-dev wget mysql-client && apt-get clean | ||
RUN docker-php-ext-install pdo_mysql | ||
RUN docker-php-ext-install mcrypt | ||
RUN docker-php-ext-install opcache | ||
RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ --with-xpm-dir=/usr/include/ | ||
RUN docker-php-ext-install gd | ||
RUN wget https://github.com/composer/composer/releases/download/1.8.6/composer.phar -O /usr/local/bin/composer && chmod +x /usr/local/bin/composer | ||
RUN docker-php-ext-install mysqli | ||
RUN docker-php-ext-install zip | ||
RUN apt-get update && \ | ||
apt-get -y install libmcrypt-dev libicu-dev libpng-dev libjpeg-dev libfreetype6-dev libxpm-dev wget mariadb-client msmtp && \ | ||
docker-php-ext-install pdo_mysql && \ | ||
docker-php-ext-install mcrypt && \ | ||
docker-php-ext-install opcache && \ | ||
docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ --with-xpm-dir=/usr/include/ && \ | ||
docker-php-ext-install gd && \ | ||
docker-php-ext-install mysqli && \ | ||
docker-php-ext-install zip && \ | ||
apt-get remove -y libmcrypt-dev libicu-dev libpng-dev libjpeg-dev libfreetype6-dev libxpm-dev gcc gcc-8 && \ | ||
apt-get autoremove -y && apt-get clean && rm -rf /usr/src/* | ||
|
||
RUN (cd /etc/apache2/mods-enabled && ln -s ../mods-available/rewrite.load .) | ||
RUN apt-get update && apt-get -y install msmtp && apt-get clean | ||
#RUN usermod -u 1050 www-data && groupmod -g 1050 www-data | ||
RUN wget https://github.com/composer/composer/releases/download/1.8.6/composer.phar -O /usr/local/bin/composer && chmod +x /usr/local/bin/composer | ||
#RUN usermod -u 1050 www-data && groupmod -g 1050 www-data |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,30 @@ | ||
FROM php:7.1-fpm-alpine | ||
RUN apk add --no-cache icu-dev icu-libs icu msmtp git vim mysql-client zlib zlib-dev \ | ||
ssmtp g++ make automake bash libpng-dev autoconf shadow libzip-dev | ||
RUN apk add --no-cache freetype libpng libjpeg-turbo freetype-dev libpng-dev libjpeg-turbo-dev && \ | ||
docker-php-ext-configure gd \ | ||
RUN apk add --no-cache mysql-client msmtp perl wget procps | ||
|
||
ENV LD_PRELOAD /usr/lib/preloadable_libiconv.so php | ||
RUN apk add --no-cache --repository http://dl-3.alpinelinux.org/alpine/edge/community gnu-libiconv && \ | ||
apk add --no-cache --virtual build-essentials \ | ||
icu-dev icu-libs zlib-dev g++ make automake autoconf shadow libzip-dev \ | ||
libpng-dev libwebp-dev libjpeg-turbo-dev freetype-dev && \ | ||
docker-php-ext-configure gd \ | ||
--with-gd \ | ||
--with-freetype-dir=/usr/include/ \ | ||
--with-png-dir=/usr/include/ \ | ||
--with-jpeg-dir=/usr/include/ && \ | ||
NPROC=$(grep -c ^processor /proc/cpuinfo 2>/dev/null || 1) && \ | ||
docker-php-ext-install -j${NPROC} gd && \ | ||
apk del --no-cache freetype-dev libpng-dev libjpeg-turbo-dev | ||
RUN docker-php-ext-install mysqli | ||
RUN docker-php-ext-install pdo_mysql | ||
RUN docker-php-ext-install intl | ||
RUN docker-php-ext-install opcache | ||
RUN docker-php-ext-install exif | ||
RUN docker-php-ext-install zip | ||
RUN wget https://github.com/composer/composer/releases/download/1.8.6/composer.phar -O /usr/local/bin/composer && chmod +x /usr/local/bin/composer | ||
ENV LD_PRELOAD /usr/lib/preloadable_libiconv.so php | ||
RUN apk add --no-cache --repository http://dl-3.alpinelinux.org/alpine/edge/community gnu-libiconv | ||
RUN docker-php-ext-install iconv | ||
#RUN usermod -u 1050 www-data && groupmod -g 1050 www-data | ||
docker-php-ext-install gd && \ | ||
docker-php-ext-install mysqli && \ | ||
docker-php-ext-install pdo_mysql && \ | ||
docker-php-ext-install intl && \ | ||
docker-php-ext-install opcache && \ | ||
docker-php-ext-install exif && \ | ||
docker-php-ext-install zip && \ | ||
apk del build-essentials && rm -rf /usr/src/php* | ||
|
||
RUN wget https://github.com/composer/composer/releases/download/1.9.2/composer.phar -O /usr/local/bin/composer && chmod +x /usr/local/bin/composer | ||
|
||
RUN wget http://mysqltuner.pl/ -O /opt/mysqltuner && \ | ||
wget https://raw.githubusercontent.com/major/MySQLTuner-perl/master/basic_passwords.txt -O /opt/basic_passwords.txt && \ | ||
wget https://raw.githubusercontent.com/major/MySQLTuner-perl/master/vulnerabilities.csv -O /opt/vulnerabilities.csv && \ | ||
chmod +x /opt/mysqltuner | ||
|
||
#RUN usermod -u 1050 www-data && groupmod -g 1050 www-data |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,28 @@ | ||
FROM php:7.2-fpm-alpine3.11 | ||
RUN apk add --no-cache icu-dev icu-libs icu msmtp git vim mysql-client zlib zlib-dev \ | ||
ssmtp g++ make automake bash libpng-dev autoconf shadow libzip-dev | ||
RUN apk add --no-cache freetype libpng libjpeg-turbo freetype-dev libpng-dev libjpeg-turbo-dev && \ | ||
docker-php-ext-configure gd \ | ||
RUN apk add --no-cache mysql-client msmtp perl wget procps | ||
|
||
RUN apk add --no-cache --virtual build-essentials \ | ||
icu-dev icu-libs zlib-dev g++ make automake autoconf shadow libzip-dev \ | ||
libpng-dev libwebp-dev libjpeg-turbo-dev freetype-dev && \ | ||
docker-php-ext-configure gd \ | ||
--with-gd \ | ||
--with-freetype-dir=/usr/include/ \ | ||
--with-png-dir=/usr/include/ \ | ||
--with-jpeg-dir=/usr/include/ && \ | ||
NPROC=$(grep -c ^processor /proc/cpuinfo 2>/dev/null || 1) && \ | ||
docker-php-ext-install -j${NPROC} gd && \ | ||
apk del --no-cache freetype-dev libpng-dev libjpeg-turbo-dev | ||
RUN docker-php-ext-install mysqli | ||
RUN docker-php-ext-install pdo_mysql | ||
RUN docker-php-ext-install intl | ||
RUN docker-php-ext-install opcache | ||
RUN docker-php-ext-install exif | ||
RUN docker-php-ext-install zip | ||
RUN wget https://github.com/composer/composer/releases/download/1.8.6/composer.phar -O /usr/local/bin/composer && chmod +x /usr/local/bin/composer | ||
ENV LD_PRELOAD /usr/lib/preloadable_libiconv.so php | ||
RUN apk add --no-cache --repository http://dl-3.alpinelinux.org/alpine/edge/community gnu-libiconv | ||
RUN docker-php-ext-install iconv | ||
#RUN usermod -u 1050 www-data && groupmod -g 1050 www-data | ||
docker-php-ext-install gd && \ | ||
docker-php-ext-install mysqli && \ | ||
docker-php-ext-install pdo_mysql && \ | ||
docker-php-ext-install intl && \ | ||
docker-php-ext-install opcache && \ | ||
docker-php-ext-install exif && \ | ||
docker-php-ext-install zip && \ | ||
apk del build-essentials && rm -rf /usr/src/php* | ||
|
||
RUN wget https://github.com/composer/composer/releases/download/1.9.2/composer.phar -O /usr/local/bin/composer && chmod +x /usr/local/bin/composer | ||
|
||
RUN wget http://mysqltuner.pl/ -O /opt/mysqltuner && \ | ||
wget https://raw.githubusercontent.com/major/MySQLTuner-perl/master/basic_passwords.txt -O /opt/basic_passwords.txt && \ | ||
wget https://raw.githubusercontent.com/major/MySQLTuner-perl/master/vulnerabilities.csv -O /opt/vulnerabilities.csv && \ | ||
chmod +x /opt/mysqltuner | ||
|
||
#RUN usermod -u 1050 www-data && groupmod -g 1050 www-data |