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%%
2
2
3
3
# install the PHP extensions we need
4
4
RUN set -ex; \
5
+ \
6
+ savedAptMark="$(apt-mark showmanual)"; \
5
7
\
6
8
apt-get update; \
7
- apt-get install -y \
9
+ apt-get install -y --no-install-recommends \
8
10
libjpeg-dev \
9
11
libpng-dev \
10
12
; \
11
- rm -rf /var/lib/apt/lists/*; \
12
13
\
13
14
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/*
16
30
17
31
# set recommended PHP.ini settings
18
32
# 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
2
2
3
3
# install the PHP extensions we need
4
4
RUN set -ex; \
5
+ \
6
+ savedAptMark="$(apt-mark showmanual)" ; \
5
7
\
6
8
apt-get update; \
7
- apt-get install -y \
9
+ apt-get install -y --no-install-recommends \
8
10
libjpeg-dev \
9
11
libpng-dev \
10
12
; \
11
- rm -rf /var/lib/apt/lists/*; \
12
13
\
13
14
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/*
16
30
17
31
# set recommended PHP.ini settings
18
32
# 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
2
2
3
3
# install the PHP extensions we need
4
4
RUN set -ex; \
5
+ \
6
+ savedAptMark="$(apt-mark showmanual)" ; \
5
7
\
6
8
apt-get update; \
7
- apt-get install -y \
9
+ apt-get install -y --no-install-recommends \
8
10
libjpeg-dev \
9
11
libpng-dev \
10
12
; \
11
- rm -rf /var/lib/apt/lists/*; \
12
13
\
13
14
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/*
16
30
17
31
# set recommended PHP.ini settings
18
32
# 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
2
2
3
3
# install the PHP extensions we need
4
4
RUN set -ex; \
5
+ \
6
+ savedAptMark="$(apt-mark showmanual)" ; \
5
7
\
6
8
apt-get update; \
7
- apt-get install -y \
9
+ apt-get install -y --no-install-recommends \
8
10
libjpeg-dev \
9
11
libpng-dev \
10
12
; \
11
- rm -rf /var/lib/apt/lists/*; \
12
13
\
13
14
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/*
16
30
17
31
# set recommended PHP.ini settings
18
32
# 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
2
2
3
3
# install the PHP extensions we need
4
4
RUN set -ex; \
5
+ \
6
+ savedAptMark="$(apt-mark showmanual)" ; \
5
7
\
6
8
apt-get update; \
7
- apt-get install -y \
9
+ apt-get install -y --no-install-recommends \
8
10
libjpeg-dev \
9
11
libpng-dev \
10
12
; \
11
- rm -rf /var/lib/apt/lists/*; \
12
13
\
13
14
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/*
16
30
17
31
# set recommended PHP.ini settings
18
32
# 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
2
2
3
3
# install the PHP extensions we need
4
4
RUN set -ex; \
5
+ \
6
+ savedAptMark="$(apt-mark showmanual)" ; \
5
7
\
6
8
apt-get update; \
7
- apt-get install -y \
9
+ apt-get install -y --no-install-recommends \
8
10
libjpeg-dev \
9
11
libpng-dev \
10
12
; \
11
- rm -rf /var/lib/apt/lists/*; \
12
13
\
13
14
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/*
16
30
17
31
# set recommended PHP.ini settings
18
32
# 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
2
2
3
3
# install the PHP extensions we need
4
4
RUN set -ex; \
5
+ \
6
+ savedAptMark="$(apt-mark showmanual)" ; \
5
7
\
6
8
apt-get update; \
7
- apt-get install -y \
9
+ apt-get install -y --no-install-recommends \
8
10
libjpeg-dev \
9
11
libpng-dev \
10
12
; \
11
- rm -rf /var/lib/apt/lists/*; \
12
13
\
13
14
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/*
16
30
17
31
# set recommended PHP.ini settings
18
32
# 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
2
2
3
3
# install the PHP extensions we need
4
4
RUN set -ex; \
5
+ \
6
+ savedAptMark="$(apt-mark showmanual)" ; \
5
7
\
6
8
apt-get update; \
7
- apt-get install -y \
9
+ apt-get install -y --no-install-recommends \
8
10
libjpeg-dev \
9
11
libpng-dev \
10
12
; \
11
- rm -rf /var/lib/apt/lists/*; \
12
13
\
13
14
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/*
16
30
17
31
# set recommended PHP.ini settings
18
32
# 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
2
2
3
3
# install the PHP extensions we need
4
4
RUN set -ex; \
5
+ \
6
+ savedAptMark="$(apt-mark showmanual)" ; \
5
7
\
6
8
apt-get update; \
7
- apt-get install -y \
9
+ apt-get install -y --no-install-recommends \
8
10
libjpeg-dev \
9
11
libpng-dev \
10
12
; \
11
- rm -rf /var/lib/apt/lists/*; \
12
13
\
13
14
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/*
16
30
17
31
# set recommended PHP.ini settings
18
32
# see https://secure.php.net/manual/en/opcache.installation.php
You can’t perform that action at this time.
0 commit comments