Skip to content

Commit f52125f

Browse files
committed
Code style and consistency
1 parent 9e6a343 commit f52125f

File tree

11 files changed

+194
-113
lines changed

11 files changed

+194
-113
lines changed

7/apache/Dockerfile

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
FROM php:7.2-apache
33

44
# install the PHP extensions we need
5-
RUN set -ex; \
5+
RUN set -eux; \
66
\
77
if command -v a2enmod; then \
88
a2enmod rewrite; \
@@ -12,13 +12,19 @@ RUN set -ex; \
1212
\
1313
apt-get update; \
1414
apt-get install -y --no-install-recommends \
15+
libfreetype6-dev \
1516
libjpeg-dev \
1617
libpng-dev \
1718
libpq-dev \
1819
libzip-dev \
1920
; \
2021
\
21-
docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr; \
22+
docker-php-ext-configure gd \
23+
--with-freetype-dir=/usr \
24+
--with-jpeg-dir=/usr \
25+
--with-png-dir=/usr \
26+
; \
27+
\
2228
docker-php-ext-install -j "$(nproc)" \
2329
gd \
2430
opcache \
@@ -57,10 +63,11 @@ WORKDIR /var/www/html
5763
ENV DRUPAL_VERSION 7.67
5864
ENV DRUPAL_MD5 78b1814e55fdaf40e753fd523d059f8d
5965

60-
RUN curl -fSL "https://ftp.drupal.org/files/projects/drupal-${DRUPAL_VERSION}.tar.gz" -o drupal.tar.gz \
61-
&& echo "${DRUPAL_MD5} *drupal.tar.gz" | md5sum -c - \
62-
&& tar -xz --strip-components=1 -f drupal.tar.gz \
63-
&& rm drupal.tar.gz \
64-
&& chown -R www-data:www-data sites modules themes
66+
RUN set -eux; \
67+
curl -fSL "https://ftp.drupal.org/files/projects/drupal-${DRUPAL_VERSION}.tar.gz" -o drupal.tar.gz; \
68+
echo "${DRUPAL_MD5} *drupal.tar.gz" | md5sum -c -; \
69+
tar -xz --strip-components=1 -f drupal.tar.gz; \
70+
rm drupal.tar.gz; \
71+
chown -R www-data:www-data sites modules themes
6572

6673
# vim:set ft=dockerfile:

7/fpm-alpine/Dockerfile

Lines changed: 24 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,32 +3,39 @@ FROM php:7.2-fpm-alpine
33

44
# install the PHP extensions we need
55
# postgresql-dev is needed for https://bugs.alpinelinux.org/issues/3642
6-
RUN set -ex \
7-
&& apk add --no-cache --virtual .build-deps \
6+
RUN set -eux; \
7+
\
8+
apk add --no-cache --virtual .build-deps \
89
coreutils \
910
freetype-dev \
1011
libjpeg-turbo-dev \
1112
libpng-dev \
1213
libzip-dev \
1314
postgresql-dev \
14-
&& docker-php-ext-configure gd \
15-
--with-freetype-dir=/usr/include/ \
16-
--with-jpeg-dir=/usr/include/ \
17-
--with-png-dir=/usr/include/ \
18-
&& docker-php-ext-install -j "$(nproc)" \
15+
; \
16+
\
17+
docker-php-ext-configure gd \
18+
--with-freetype-dir=/usr/include \
19+
--with-jpeg-dir=/usr/include \
20+
--with-png-dir=/usr/include \
21+
; \
22+
\
23+
docker-php-ext-install -j "$(nproc)" \
1924
gd \
2025
opcache \
2126
pdo_mysql \
2227
pdo_pgsql \
2328
zip \
24-
&& runDeps="$( \
29+
; \
30+
\
31+
runDeps="$( \
2532
scanelf --needed --nobanner --format '%n#p' --recursive /usr/local \
2633
| tr ',' '\n' \
2734
| sort -u \
2835
| awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \
29-
)" \
30-
&& apk add --virtual .drupal-phpexts-rundeps $runDeps \
31-
&& apk del .build-deps
36+
)"; \
37+
apk add --virtual .drupal-phpexts-rundeps $runDeps; \
38+
apk del .build-deps
3239

3340
# set recommended PHP.ini settings
3441
# see https://secure.php.net/manual/en/opcache.installation.php
@@ -46,10 +53,11 @@ WORKDIR /var/www/html
4653
ENV DRUPAL_VERSION 7.67
4754
ENV DRUPAL_MD5 78b1814e55fdaf40e753fd523d059f8d
4855

49-
RUN curl -fSL "https://ftp.drupal.org/files/projects/drupal-${DRUPAL_VERSION}.tar.gz" -o drupal.tar.gz \
50-
&& echo "${DRUPAL_MD5} *drupal.tar.gz" | md5sum -c - \
51-
&& tar -xz --strip-components=1 -f drupal.tar.gz \
52-
&& rm drupal.tar.gz \
53-
&& chown -R www-data:www-data sites modules themes
56+
RUN set -eux; \
57+
curl -fSL "https://ftp.drupal.org/files/projects/drupal-${DRUPAL_VERSION}.tar.gz" -o drupal.tar.gz; \
58+
echo "${DRUPAL_MD5} *drupal.tar.gz" | md5sum -c -; \
59+
tar -xz --strip-components=1 -f drupal.tar.gz; \
60+
rm drupal.tar.gz; \
61+
chown -R www-data:www-data sites modules themes
5462

5563
# vim:set ft=dockerfile:

7/fpm/Dockerfile

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
FROM php:7.2-fpm
33

44
# install the PHP extensions we need
5-
RUN set -ex; \
5+
RUN set -eux; \
66
\
77
if command -v a2enmod; then \
88
a2enmod rewrite; \
@@ -12,13 +12,19 @@ RUN set -ex; \
1212
\
1313
apt-get update; \
1414
apt-get install -y --no-install-recommends \
15+
libfreetype6-dev \
1516
libjpeg-dev \
1617
libpng-dev \
1718
libpq-dev \
1819
libzip-dev \
1920
; \
2021
\
21-
docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr; \
22+
docker-php-ext-configure gd \
23+
--with-freetype-dir=/usr \
24+
--with-jpeg-dir=/usr \
25+
--with-png-dir=/usr \
26+
; \
27+
\
2228
docker-php-ext-install -j "$(nproc)" \
2329
gd \
2430
opcache \
@@ -57,10 +63,11 @@ WORKDIR /var/www/html
5763
ENV DRUPAL_VERSION 7.67
5864
ENV DRUPAL_MD5 78b1814e55fdaf40e753fd523d059f8d
5965

60-
RUN curl -fSL "https://ftp.drupal.org/files/projects/drupal-${DRUPAL_VERSION}.tar.gz" -o drupal.tar.gz \
61-
&& echo "${DRUPAL_MD5} *drupal.tar.gz" | md5sum -c - \
62-
&& tar -xz --strip-components=1 -f drupal.tar.gz \
63-
&& rm drupal.tar.gz \
64-
&& chown -R www-data:www-data sites modules themes
66+
RUN set -eux; \
67+
curl -fSL "https://ftp.drupal.org/files/projects/drupal-${DRUPAL_VERSION}.tar.gz" -o drupal.tar.gz; \
68+
echo "${DRUPAL_MD5} *drupal.tar.gz" | md5sum -c -; \
69+
tar -xz --strip-components=1 -f drupal.tar.gz; \
70+
rm drupal.tar.gz; \
71+
chown -R www-data:www-data sites modules themes
6572

6673
# vim:set ft=dockerfile:

8.6/apache/Dockerfile

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
FROM php:7.3-apache
33

44
# install the PHP extensions we need
5-
RUN set -ex; \
5+
RUN set -eux; \
66
\
77
if command -v a2enmod; then \
88
a2enmod rewrite; \
@@ -12,13 +12,19 @@ RUN set -ex; \
1212
\
1313
apt-get update; \
1414
apt-get install -y --no-install-recommends \
15+
libfreetype6-dev \
1516
libjpeg-dev \
1617
libpng-dev \
1718
libpq-dev \
1819
libzip-dev \
1920
; \
2021
\
21-
docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr; \
22+
docker-php-ext-configure gd \
23+
--with-freetype-dir=/usr \
24+
--with-jpeg-dir=/usr \
25+
--with-png-dir=/usr \
26+
; \
27+
\
2228
docker-php-ext-install -j "$(nproc)" \
2329
gd \
2430
opcache \
@@ -57,10 +63,11 @@ WORKDIR /var/www/html
5763
ENV DRUPAL_VERSION 8.6.17
5864
ENV DRUPAL_MD5 9018a2d11381aeb0e269ca696fed9ac5
5965

60-
RUN curl -fSL "https://ftp.drupal.org/files/projects/drupal-${DRUPAL_VERSION}.tar.gz" -o drupal.tar.gz \
61-
&& echo "${DRUPAL_MD5} *drupal.tar.gz" | md5sum -c - \
62-
&& tar -xz --strip-components=1 -f drupal.tar.gz \
63-
&& rm drupal.tar.gz \
64-
&& chown -R www-data:www-data sites modules themes
66+
RUN set -eux; \
67+
curl -fSL "https://ftp.drupal.org/files/projects/drupal-${DRUPAL_VERSION}.tar.gz" -o drupal.tar.gz; \
68+
echo "${DRUPAL_MD5} *drupal.tar.gz" | md5sum -c -; \
69+
tar -xz --strip-components=1 -f drupal.tar.gz; \
70+
rm drupal.tar.gz; \
71+
chown -R www-data:www-data sites modules themes
6572

6673
# vim:set ft=dockerfile:

8.6/fpm-alpine/Dockerfile

Lines changed: 24 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,32 +3,39 @@ FROM php:7.3-fpm-alpine
33

44
# install the PHP extensions we need
55
# postgresql-dev is needed for https://bugs.alpinelinux.org/issues/3642
6-
RUN set -ex \
7-
&& apk add --no-cache --virtual .build-deps \
6+
RUN set -eux; \
7+
\
8+
apk add --no-cache --virtual .build-deps \
89
coreutils \
910
freetype-dev \
1011
libjpeg-turbo-dev \
1112
libpng-dev \
1213
libzip-dev \
1314
postgresql-dev \
14-
&& docker-php-ext-configure gd \
15-
--with-freetype-dir=/usr/include/ \
16-
--with-jpeg-dir=/usr/include/ \
17-
--with-png-dir=/usr/include/ \
18-
&& docker-php-ext-install -j "$(nproc)" \
15+
; \
16+
\
17+
docker-php-ext-configure gd \
18+
--with-freetype-dir=/usr/include \
19+
--with-jpeg-dir=/usr/include \
20+
--with-png-dir=/usr/include \
21+
; \
22+
\
23+
docker-php-ext-install -j "$(nproc)" \
1924
gd \
2025
opcache \
2126
pdo_mysql \
2227
pdo_pgsql \
2328
zip \
24-
&& runDeps="$( \
29+
; \
30+
\
31+
runDeps="$( \
2532
scanelf --needed --nobanner --format '%n#p' --recursive /usr/local \
2633
| tr ',' '\n' \
2734
| sort -u \
2835
| awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \
29-
)" \
30-
&& apk add --virtual .drupal-phpexts-rundeps $runDeps \
31-
&& apk del .build-deps
36+
)"; \
37+
apk add --virtual .drupal-phpexts-rundeps $runDeps; \
38+
apk del .build-deps
3239

3340
# set recommended PHP.ini settings
3441
# see https://secure.php.net/manual/en/opcache.installation.php
@@ -46,10 +53,11 @@ WORKDIR /var/www/html
4653
ENV DRUPAL_VERSION 8.6.17
4754
ENV DRUPAL_MD5 9018a2d11381aeb0e269ca696fed9ac5
4855

49-
RUN curl -fSL "https://ftp.drupal.org/files/projects/drupal-${DRUPAL_VERSION}.tar.gz" -o drupal.tar.gz \
50-
&& echo "${DRUPAL_MD5} *drupal.tar.gz" | md5sum -c - \
51-
&& tar -xz --strip-components=1 -f drupal.tar.gz \
52-
&& rm drupal.tar.gz \
53-
&& chown -R www-data:www-data sites modules themes
56+
RUN set -eux; \
57+
curl -fSL "https://ftp.drupal.org/files/projects/drupal-${DRUPAL_VERSION}.tar.gz" -o drupal.tar.gz; \
58+
echo "${DRUPAL_MD5} *drupal.tar.gz" | md5sum -c -; \
59+
tar -xz --strip-components=1 -f drupal.tar.gz; \
60+
rm drupal.tar.gz; \
61+
chown -R www-data:www-data sites modules themes
5462

5563
# vim:set ft=dockerfile:

8.6/fpm/Dockerfile

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
FROM php:7.3-fpm
33

44
# install the PHP extensions we need
5-
RUN set -ex; \
5+
RUN set -eux; \
66
\
77
if command -v a2enmod; then \
88
a2enmod rewrite; \
@@ -12,13 +12,19 @@ RUN set -ex; \
1212
\
1313
apt-get update; \
1414
apt-get install -y --no-install-recommends \
15+
libfreetype6-dev \
1516
libjpeg-dev \
1617
libpng-dev \
1718
libpq-dev \
1819
libzip-dev \
1920
; \
2021
\
21-
docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr; \
22+
docker-php-ext-configure gd \
23+
--with-freetype-dir=/usr \
24+
--with-jpeg-dir=/usr \
25+
--with-png-dir=/usr \
26+
; \
27+
\
2228
docker-php-ext-install -j "$(nproc)" \
2329
gd \
2430
opcache \
@@ -57,10 +63,11 @@ WORKDIR /var/www/html
5763
ENV DRUPAL_VERSION 8.6.17
5864
ENV DRUPAL_MD5 9018a2d11381aeb0e269ca696fed9ac5
5965

60-
RUN curl -fSL "https://ftp.drupal.org/files/projects/drupal-${DRUPAL_VERSION}.tar.gz" -o drupal.tar.gz \
61-
&& echo "${DRUPAL_MD5} *drupal.tar.gz" | md5sum -c - \
62-
&& tar -xz --strip-components=1 -f drupal.tar.gz \
63-
&& rm drupal.tar.gz \
64-
&& chown -R www-data:www-data sites modules themes
66+
RUN set -eux; \
67+
curl -fSL "https://ftp.drupal.org/files/projects/drupal-${DRUPAL_VERSION}.tar.gz" -o drupal.tar.gz; \
68+
echo "${DRUPAL_MD5} *drupal.tar.gz" | md5sum -c -; \
69+
tar -xz --strip-components=1 -f drupal.tar.gz; \
70+
rm drupal.tar.gz; \
71+
chown -R www-data:www-data sites modules themes
6572

6673
# vim:set ft=dockerfile:

8.7/apache/Dockerfile

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
FROM php:7.3-apache
33

44
# install the PHP extensions we need
5-
RUN set -ex; \
5+
RUN set -eux; \
66
\
77
if command -v a2enmod; then \
88
a2enmod rewrite; \
@@ -12,13 +12,19 @@ RUN set -ex; \
1212
\
1313
apt-get update; \
1414
apt-get install -y --no-install-recommends \
15+
libfreetype6-dev \
1516
libjpeg-dev \
1617
libpng-dev \
1718
libpq-dev \
1819
libzip-dev \
1920
; \
2021
\
21-
docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr; \
22+
docker-php-ext-configure gd \
23+
--with-freetype-dir=/usr \
24+
--with-jpeg-dir=/usr \
25+
--with-png-dir=/usr \
26+
; \
27+
\
2228
docker-php-ext-install -j "$(nproc)" \
2329
gd \
2430
opcache \
@@ -57,10 +63,11 @@ WORKDIR /var/www/html
5763
ENV DRUPAL_VERSION 8.7.3
5864
ENV DRUPAL_MD5 bba896a1ed2fbe4a1744d82c036fcfc4
5965

60-
RUN curl -fSL "https://ftp.drupal.org/files/projects/drupal-${DRUPAL_VERSION}.tar.gz" -o drupal.tar.gz \
61-
&& echo "${DRUPAL_MD5} *drupal.tar.gz" | md5sum -c - \
62-
&& tar -xz --strip-components=1 -f drupal.tar.gz \
63-
&& rm drupal.tar.gz \
64-
&& chown -R www-data:www-data sites modules themes
66+
RUN set -eux; \
67+
curl -fSL "https://ftp.drupal.org/files/projects/drupal-${DRUPAL_VERSION}.tar.gz" -o drupal.tar.gz; \
68+
echo "${DRUPAL_MD5} *drupal.tar.gz" | md5sum -c -; \
69+
tar -xz --strip-components=1 -f drupal.tar.gz; \
70+
rm drupal.tar.gz; \
71+
chown -R www-data:www-data sites modules themes
6572

6673
# vim:set ft=dockerfile:

0 commit comments

Comments
 (0)