File tree Expand file tree Collapse file tree 9 files changed +162
-36
lines changed Expand file tree Collapse file tree 9 files changed +162
-36
lines changed Original file line number Diff line number Diff line change @@ -2,17 +2,31 @@ FROM php:%%PHP_VERSION%%-%%VARIANT%%
22
33# install the PHP extensions we need
44RUN set -ex; \
5+ \
6+ savedAptMark="$(apt-mark showmanual)"; \
57 \
68 apt-get update; \
7- apt-get install -y \
9+ apt-get install -y --no-install-recommends \
810 libjpeg-dev \
911 libpng-dev \
1012 ; \
11- rm -rf /var/lib/apt/lists/*; \
1213 \
1314 docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr; \
14- docker-php-ext-install gd mysqli opcache
15- # TODO consider removing the *-dev deps and only keeping the necessary lib* packages
15+ docker-php-ext-install gd mysqli opcache; \
16+ \
17+ # reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies
18+ apt-mark auto '.*' > /dev/null; \
19+ apt-mark manual $savedAptMark; \
20+ ldd "$(php -r 'echo ini_get("extension_dir");')"/*.so \
21+ | awk '/=>/ { print $3 }' \
22+ | sort -u \
23+ | xargs -r dpkg-query -S \
24+ | cut -d: -f1 \
25+ | sort -u \
26+ | xargs -rt apt-mark manual; \
27+ \
28+ apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
29+ rm -rf /var/lib/apt/lists/*
1630
1731# set recommended PHP.ini settings
1832# see https://secure.php.net/manual/en/opcache.installation.php
Original file line number Diff line number Diff line change @@ -2,17 +2,31 @@ FROM php:5.6-apache
22
33# install the PHP extensions we need
44RUN set -ex; \
5+ \
6+ savedAptMark="$(apt-mark showmanual)" ; \
57 \
68 apt-get update; \
7- apt-get install -y \
9+ apt-get install -y --no-install-recommends \
810 libjpeg-dev \
911 libpng-dev \
1012 ; \
11- rm -rf /var/lib/apt/lists/*; \
1213 \
1314 docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr; \
14- docker-php-ext-install gd mysqli opcache
15- # TODO consider removing the *-dev deps and only keeping the necessary lib* packages
15+ docker-php-ext-install gd mysqli opcache; \
16+ \
17+ # reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies
18+ apt-mark auto '.*' > /dev/null; \
19+ apt-mark manual $savedAptMark; \
20+ ldd "$(php -r 'echo ini_get(" extension_dir");')" /*.so \
21+ | awk '/=>/ { print $3 }' \
22+ | sort -u \
23+ | xargs -r dpkg-query -S \
24+ | cut -d: -f1 \
25+ | sort -u \
26+ | xargs -rt apt-mark manual; \
27+ \
28+ apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
29+ rm -rf /var/lib/apt/lists/*
1630
1731# set recommended PHP.ini settings
1832# see https://secure.php.net/manual/en/opcache.installation.php
Original file line number Diff line number Diff line change @@ -2,17 +2,31 @@ FROM php:5.6-fpm
22
33# install the PHP extensions we need
44RUN set -ex; \
5+ \
6+ savedAptMark="$(apt-mark showmanual)" ; \
57 \
68 apt-get update; \
7- apt-get install -y \
9+ apt-get install -y --no-install-recommends \
810 libjpeg-dev \
911 libpng-dev \
1012 ; \
11- rm -rf /var/lib/apt/lists/*; \
1213 \
1314 docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr; \
14- docker-php-ext-install gd mysqli opcache
15- # TODO consider removing the *-dev deps and only keeping the necessary lib* packages
15+ docker-php-ext-install gd mysqli opcache; \
16+ \
17+ # reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies
18+ apt-mark auto '.*' > /dev/null; \
19+ apt-mark manual $savedAptMark; \
20+ ldd "$(php -r 'echo ini_get(" extension_dir");')" /*.so \
21+ | awk '/=>/ { print $3 }' \
22+ | sort -u \
23+ | xargs -r dpkg-query -S \
24+ | cut -d: -f1 \
25+ | sort -u \
26+ | xargs -rt apt-mark manual; \
27+ \
28+ apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
29+ rm -rf /var/lib/apt/lists/*
1630
1731# set recommended PHP.ini settings
1832# see https://secure.php.net/manual/en/opcache.installation.php
Original file line number Diff line number Diff line change @@ -2,17 +2,31 @@ FROM php:7.0-apache
22
33# install the PHP extensions we need
44RUN set -ex; \
5+ \
6+ savedAptMark="$(apt-mark showmanual)" ; \
57 \
68 apt-get update; \
7- apt-get install -y \
9+ apt-get install -y --no-install-recommends \
810 libjpeg-dev \
911 libpng-dev \
1012 ; \
11- rm -rf /var/lib/apt/lists/*; \
1213 \
1314 docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr; \
14- docker-php-ext-install gd mysqli opcache
15- # TODO consider removing the *-dev deps and only keeping the necessary lib* packages
15+ docker-php-ext-install gd mysqli opcache; \
16+ \
17+ # reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies
18+ apt-mark auto '.*' > /dev/null; \
19+ apt-mark manual $savedAptMark; \
20+ ldd "$(php -r 'echo ini_get(" extension_dir");')" /*.so \
21+ | awk '/=>/ { print $3 }' \
22+ | sort -u \
23+ | xargs -r dpkg-query -S \
24+ | cut -d: -f1 \
25+ | sort -u \
26+ | xargs -rt apt-mark manual; \
27+ \
28+ apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
29+ rm -rf /var/lib/apt/lists/*
1630
1731# set recommended PHP.ini settings
1832# see https://secure.php.net/manual/en/opcache.installation.php
Original file line number Diff line number Diff line change @@ -2,17 +2,31 @@ FROM php:7.0-fpm
22
33# install the PHP extensions we need
44RUN set -ex; \
5+ \
6+ savedAptMark="$(apt-mark showmanual)" ; \
57 \
68 apt-get update; \
7- apt-get install -y \
9+ apt-get install -y --no-install-recommends \
810 libjpeg-dev \
911 libpng-dev \
1012 ; \
11- rm -rf /var/lib/apt/lists/*; \
1213 \
1314 docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr; \
14- docker-php-ext-install gd mysqli opcache
15- # TODO consider removing the *-dev deps and only keeping the necessary lib* packages
15+ docker-php-ext-install gd mysqli opcache; \
16+ \
17+ # reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies
18+ apt-mark auto '.*' > /dev/null; \
19+ apt-mark manual $savedAptMark; \
20+ ldd "$(php -r 'echo ini_get(" extension_dir");')" /*.so \
21+ | awk '/=>/ { print $3 }' \
22+ | sort -u \
23+ | xargs -r dpkg-query -S \
24+ | cut -d: -f1 \
25+ | sort -u \
26+ | xargs -rt apt-mark manual; \
27+ \
28+ apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
29+ rm -rf /var/lib/apt/lists/*
1630
1731# set recommended PHP.ini settings
1832# see https://secure.php.net/manual/en/opcache.installation.php
Original file line number Diff line number Diff line change @@ -2,17 +2,31 @@ FROM php:7.1-apache
22
33# install the PHP extensions we need
44RUN set -ex; \
5+ \
6+ savedAptMark="$(apt-mark showmanual)" ; \
57 \
68 apt-get update; \
7- apt-get install -y \
9+ apt-get install -y --no-install-recommends \
810 libjpeg-dev \
911 libpng-dev \
1012 ; \
11- rm -rf /var/lib/apt/lists/*; \
1213 \
1314 docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr; \
14- docker-php-ext-install gd mysqli opcache
15- # TODO consider removing the *-dev deps and only keeping the necessary lib* packages
15+ docker-php-ext-install gd mysqli opcache; \
16+ \
17+ # reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies
18+ apt-mark auto '.*' > /dev/null; \
19+ apt-mark manual $savedAptMark; \
20+ ldd "$(php -r 'echo ini_get(" extension_dir");')" /*.so \
21+ | awk '/=>/ { print $3 }' \
22+ | sort -u \
23+ | xargs -r dpkg-query -S \
24+ | cut -d: -f1 \
25+ | sort -u \
26+ | xargs -rt apt-mark manual; \
27+ \
28+ apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
29+ rm -rf /var/lib/apt/lists/*
1630
1731# set recommended PHP.ini settings
1832# see https://secure.php.net/manual/en/opcache.installation.php
Original file line number Diff line number Diff line change @@ -2,17 +2,31 @@ FROM php:7.1-fpm
22
33# install the PHP extensions we need
44RUN set -ex; \
5+ \
6+ savedAptMark="$(apt-mark showmanual)" ; \
57 \
68 apt-get update; \
7- apt-get install -y \
9+ apt-get install -y --no-install-recommends \
810 libjpeg-dev \
911 libpng-dev \
1012 ; \
11- rm -rf /var/lib/apt/lists/*; \
1213 \
1314 docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr; \
14- docker-php-ext-install gd mysqli opcache
15- # TODO consider removing the *-dev deps and only keeping the necessary lib* packages
15+ docker-php-ext-install gd mysqli opcache; \
16+ \
17+ # reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies
18+ apt-mark auto '.*' > /dev/null; \
19+ apt-mark manual $savedAptMark; \
20+ ldd "$(php -r 'echo ini_get(" extension_dir");')" /*.so \
21+ | awk '/=>/ { print $3 }' \
22+ | sort -u \
23+ | xargs -r dpkg-query -S \
24+ | cut -d: -f1 \
25+ | sort -u \
26+ | xargs -rt apt-mark manual; \
27+ \
28+ apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
29+ rm -rf /var/lib/apt/lists/*
1630
1731# set recommended PHP.ini settings
1832# see https://secure.php.net/manual/en/opcache.installation.php
Original file line number Diff line number Diff line change @@ -2,17 +2,31 @@ FROM php:7.2-apache
22
33# install the PHP extensions we need
44RUN set -ex; \
5+ \
6+ savedAptMark="$(apt-mark showmanual)" ; \
57 \
68 apt-get update; \
7- apt-get install -y \
9+ apt-get install -y --no-install-recommends \
810 libjpeg-dev \
911 libpng-dev \
1012 ; \
11- rm -rf /var/lib/apt/lists/*; \
1213 \
1314 docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr; \
14- docker-php-ext-install gd mysqli opcache
15- # TODO consider removing the *-dev deps and only keeping the necessary lib* packages
15+ docker-php-ext-install gd mysqli opcache; \
16+ \
17+ # reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies
18+ apt-mark auto '.*' > /dev/null; \
19+ apt-mark manual $savedAptMark; \
20+ ldd "$(php -r 'echo ini_get(" extension_dir");')" /*.so \
21+ | awk '/=>/ { print $3 }' \
22+ | sort -u \
23+ | xargs -r dpkg-query -S \
24+ | cut -d: -f1 \
25+ | sort -u \
26+ | xargs -rt apt-mark manual; \
27+ \
28+ apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
29+ rm -rf /var/lib/apt/lists/*
1630
1731# set recommended PHP.ini settings
1832# see https://secure.php.net/manual/en/opcache.installation.php
Original file line number Diff line number Diff line change @@ -2,17 +2,31 @@ FROM php:7.2-fpm
22
33# install the PHP extensions we need
44RUN set -ex; \
5+ \
6+ savedAptMark="$(apt-mark showmanual)" ; \
57 \
68 apt-get update; \
7- apt-get install -y \
9+ apt-get install -y --no-install-recommends \
810 libjpeg-dev \
911 libpng-dev \
1012 ; \
11- rm -rf /var/lib/apt/lists/*; \
1213 \
1314 docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr; \
14- docker-php-ext-install gd mysqli opcache
15- # TODO consider removing the *-dev deps and only keeping the necessary lib* packages
15+ docker-php-ext-install gd mysqli opcache; \
16+ \
17+ # reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies
18+ apt-mark auto '.*' > /dev/null; \
19+ apt-mark manual $savedAptMark; \
20+ ldd "$(php -r 'echo ini_get(" extension_dir");')" /*.so \
21+ | awk '/=>/ { print $3 }' \
22+ | sort -u \
23+ | xargs -r dpkg-query -S \
24+ | cut -d: -f1 \
25+ | sort -u \
26+ | xargs -rt apt-mark manual; \
27+ \
28+ apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
29+ rm -rf /var/lib/apt/lists/*
1630
1731# set recommended PHP.ini settings
1832# see https://secure.php.net/manual/en/opcache.installation.php
You can’t perform that action at this time.
0 commit comments