Skip to content

Commit

Permalink
Code style and consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
J0WI committed Jun 27, 2019
1 parent 9e6a343 commit f52125f
Show file tree
Hide file tree
Showing 11 changed files with 194 additions and 113 deletions.
21 changes: 14 additions & 7 deletions 7/apache/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
FROM php:7.2-apache

# install the PHP extensions we need
RUN set -ex; \
RUN set -eux; \
\
if command -v a2enmod; then \
a2enmod rewrite; \
Expand All @@ -12,13 +12,19 @@ RUN set -ex; \
\
apt-get update; \
apt-get install -y --no-install-recommends \
libfreetype6-dev \
libjpeg-dev \
libpng-dev \
libpq-dev \
libzip-dev \
; \
\
docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr; \
docker-php-ext-configure gd \
--with-freetype-dir=/usr \
--with-jpeg-dir=/usr \
--with-png-dir=/usr \
; \
\
docker-php-ext-install -j "$(nproc)" \
gd \
opcache \
Expand Down Expand Up @@ -57,10 +63,11 @@ WORKDIR /var/www/html
ENV DRUPAL_VERSION 7.67
ENV DRUPAL_MD5 78b1814e55fdaf40e753fd523d059f8d

RUN curl -fSL "https://ftp.drupal.org/files/projects/drupal-${DRUPAL_VERSION}.tar.gz" -o drupal.tar.gz \
&& echo "${DRUPAL_MD5} *drupal.tar.gz" | md5sum -c - \
&& tar -xz --strip-components=1 -f drupal.tar.gz \
&& rm drupal.tar.gz \
&& chown -R www-data:www-data sites modules themes
RUN set -eux; \
curl -fSL "https://ftp.drupal.org/files/projects/drupal-${DRUPAL_VERSION}.tar.gz" -o drupal.tar.gz; \
echo "${DRUPAL_MD5} *drupal.tar.gz" | md5sum -c -; \
tar -xz --strip-components=1 -f drupal.tar.gz; \
rm drupal.tar.gz; \
chown -R www-data:www-data sites modules themes

# vim:set ft=dockerfile:
40 changes: 24 additions & 16 deletions 7/fpm-alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,39 @@ FROM php:7.2-fpm-alpine

# install the PHP extensions we need
# postgresql-dev is needed for https://bugs.alpinelinux.org/issues/3642
RUN set -ex \
&& apk add --no-cache --virtual .build-deps \
RUN set -eux; \
\
apk add --no-cache --virtual .build-deps \
coreutils \
freetype-dev \
libjpeg-turbo-dev \
libpng-dev \
libzip-dev \
postgresql-dev \
&& docker-php-ext-configure gd \
--with-freetype-dir=/usr/include/ \
--with-jpeg-dir=/usr/include/ \
--with-png-dir=/usr/include/ \
&& docker-php-ext-install -j "$(nproc)" \
; \
\
docker-php-ext-configure gd \
--with-freetype-dir=/usr/include \
--with-jpeg-dir=/usr/include \
--with-png-dir=/usr/include \
; \
\
docker-php-ext-install -j "$(nproc)" \
gd \
opcache \
pdo_mysql \
pdo_pgsql \
zip \
&& runDeps="$( \
; \
\
runDeps="$( \
scanelf --needed --nobanner --format '%n#p' --recursive /usr/local \
| tr ',' '\n' \
| sort -u \
| awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \
)" \
&& apk add --virtual .drupal-phpexts-rundeps $runDeps \
&& apk del .build-deps
)"; \
apk add --virtual .drupal-phpexts-rundeps $runDeps; \
apk del .build-deps

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

RUN curl -fSL "https://ftp.drupal.org/files/projects/drupal-${DRUPAL_VERSION}.tar.gz" -o drupal.tar.gz \
&& echo "${DRUPAL_MD5} *drupal.tar.gz" | md5sum -c - \
&& tar -xz --strip-components=1 -f drupal.tar.gz \
&& rm drupal.tar.gz \
&& chown -R www-data:www-data sites modules themes
RUN set -eux; \
curl -fSL "https://ftp.drupal.org/files/projects/drupal-${DRUPAL_VERSION}.tar.gz" -o drupal.tar.gz; \
echo "${DRUPAL_MD5} *drupal.tar.gz" | md5sum -c -; \
tar -xz --strip-components=1 -f drupal.tar.gz; \
rm drupal.tar.gz; \
chown -R www-data:www-data sites modules themes

# vim:set ft=dockerfile:
21 changes: 14 additions & 7 deletions 7/fpm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
FROM php:7.2-fpm

# install the PHP extensions we need
RUN set -ex; \
RUN set -eux; \
\
if command -v a2enmod; then \
a2enmod rewrite; \
Expand All @@ -12,13 +12,19 @@ RUN set -ex; \
\
apt-get update; \
apt-get install -y --no-install-recommends \
libfreetype6-dev \
libjpeg-dev \
libpng-dev \
libpq-dev \
libzip-dev \
; \
\
docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr; \
docker-php-ext-configure gd \
--with-freetype-dir=/usr \
--with-jpeg-dir=/usr \
--with-png-dir=/usr \
; \
\
docker-php-ext-install -j "$(nproc)" \
gd \
opcache \
Expand Down Expand Up @@ -57,10 +63,11 @@ WORKDIR /var/www/html
ENV DRUPAL_VERSION 7.67
ENV DRUPAL_MD5 78b1814e55fdaf40e753fd523d059f8d

RUN curl -fSL "https://ftp.drupal.org/files/projects/drupal-${DRUPAL_VERSION}.tar.gz" -o drupal.tar.gz \
&& echo "${DRUPAL_MD5} *drupal.tar.gz" | md5sum -c - \
&& tar -xz --strip-components=1 -f drupal.tar.gz \
&& rm drupal.tar.gz \
&& chown -R www-data:www-data sites modules themes
RUN set -eux; \
curl -fSL "https://ftp.drupal.org/files/projects/drupal-${DRUPAL_VERSION}.tar.gz" -o drupal.tar.gz; \
echo "${DRUPAL_MD5} *drupal.tar.gz" | md5sum -c -; \
tar -xz --strip-components=1 -f drupal.tar.gz; \
rm drupal.tar.gz; \
chown -R www-data:www-data sites modules themes

# vim:set ft=dockerfile:
21 changes: 14 additions & 7 deletions 8.6/apache/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
FROM php:7.3-apache

# install the PHP extensions we need
RUN set -ex; \
RUN set -eux; \
\
if command -v a2enmod; then \
a2enmod rewrite; \
Expand All @@ -12,13 +12,19 @@ RUN set -ex; \
\
apt-get update; \
apt-get install -y --no-install-recommends \
libfreetype6-dev \
libjpeg-dev \
libpng-dev \
libpq-dev \
libzip-dev \
; \
\
docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr; \
docker-php-ext-configure gd \
--with-freetype-dir=/usr \
--with-jpeg-dir=/usr \
--with-png-dir=/usr \
; \
\
docker-php-ext-install -j "$(nproc)" \
gd \
opcache \
Expand Down Expand Up @@ -57,10 +63,11 @@ WORKDIR /var/www/html
ENV DRUPAL_VERSION 8.6.17
ENV DRUPAL_MD5 9018a2d11381aeb0e269ca696fed9ac5

RUN curl -fSL "https://ftp.drupal.org/files/projects/drupal-${DRUPAL_VERSION}.tar.gz" -o drupal.tar.gz \
&& echo "${DRUPAL_MD5} *drupal.tar.gz" | md5sum -c - \
&& tar -xz --strip-components=1 -f drupal.tar.gz \
&& rm drupal.tar.gz \
&& chown -R www-data:www-data sites modules themes
RUN set -eux; \
curl -fSL "https://ftp.drupal.org/files/projects/drupal-${DRUPAL_VERSION}.tar.gz" -o drupal.tar.gz; \
echo "${DRUPAL_MD5} *drupal.tar.gz" | md5sum -c -; \
tar -xz --strip-components=1 -f drupal.tar.gz; \
rm drupal.tar.gz; \
chown -R www-data:www-data sites modules themes

# vim:set ft=dockerfile:
40 changes: 24 additions & 16 deletions 8.6/fpm-alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,39 @@ FROM php:7.3-fpm-alpine

# install the PHP extensions we need
# postgresql-dev is needed for https://bugs.alpinelinux.org/issues/3642
RUN set -ex \
&& apk add --no-cache --virtual .build-deps \
RUN set -eux; \
\
apk add --no-cache --virtual .build-deps \
coreutils \
freetype-dev \
libjpeg-turbo-dev \
libpng-dev \
libzip-dev \
postgresql-dev \
&& docker-php-ext-configure gd \
--with-freetype-dir=/usr/include/ \
--with-jpeg-dir=/usr/include/ \
--with-png-dir=/usr/include/ \
&& docker-php-ext-install -j "$(nproc)" \
; \
\
docker-php-ext-configure gd \
--with-freetype-dir=/usr/include \
--with-jpeg-dir=/usr/include \
--with-png-dir=/usr/include \
; \
\
docker-php-ext-install -j "$(nproc)" \
gd \
opcache \
pdo_mysql \
pdo_pgsql \
zip \
&& runDeps="$( \
; \
\
runDeps="$( \
scanelf --needed --nobanner --format '%n#p' --recursive /usr/local \
| tr ',' '\n' \
| sort -u \
| awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \
)" \
&& apk add --virtual .drupal-phpexts-rundeps $runDeps \
&& apk del .build-deps
)"; \
apk add --virtual .drupal-phpexts-rundeps $runDeps; \
apk del .build-deps

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

RUN curl -fSL "https://ftp.drupal.org/files/projects/drupal-${DRUPAL_VERSION}.tar.gz" -o drupal.tar.gz \
&& echo "${DRUPAL_MD5} *drupal.tar.gz" | md5sum -c - \
&& tar -xz --strip-components=1 -f drupal.tar.gz \
&& rm drupal.tar.gz \
&& chown -R www-data:www-data sites modules themes
RUN set -eux; \
curl -fSL "https://ftp.drupal.org/files/projects/drupal-${DRUPAL_VERSION}.tar.gz" -o drupal.tar.gz; \
echo "${DRUPAL_MD5} *drupal.tar.gz" | md5sum -c -; \
tar -xz --strip-components=1 -f drupal.tar.gz; \
rm drupal.tar.gz; \
chown -R www-data:www-data sites modules themes

# vim:set ft=dockerfile:
21 changes: 14 additions & 7 deletions 8.6/fpm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
FROM php:7.3-fpm

# install the PHP extensions we need
RUN set -ex; \
RUN set -eux; \
\
if command -v a2enmod; then \
a2enmod rewrite; \
Expand All @@ -12,13 +12,19 @@ RUN set -ex; \
\
apt-get update; \
apt-get install -y --no-install-recommends \
libfreetype6-dev \
libjpeg-dev \
libpng-dev \
libpq-dev \
libzip-dev \
; \
\
docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr; \
docker-php-ext-configure gd \
--with-freetype-dir=/usr \
--with-jpeg-dir=/usr \
--with-png-dir=/usr \
; \
\
docker-php-ext-install -j "$(nproc)" \
gd \
opcache \
Expand Down Expand Up @@ -57,10 +63,11 @@ WORKDIR /var/www/html
ENV DRUPAL_VERSION 8.6.17
ENV DRUPAL_MD5 9018a2d11381aeb0e269ca696fed9ac5

RUN curl -fSL "https://ftp.drupal.org/files/projects/drupal-${DRUPAL_VERSION}.tar.gz" -o drupal.tar.gz \
&& echo "${DRUPAL_MD5} *drupal.tar.gz" | md5sum -c - \
&& tar -xz --strip-components=1 -f drupal.tar.gz \
&& rm drupal.tar.gz \
&& chown -R www-data:www-data sites modules themes
RUN set -eux; \
curl -fSL "https://ftp.drupal.org/files/projects/drupal-${DRUPAL_VERSION}.tar.gz" -o drupal.tar.gz; \
echo "${DRUPAL_MD5} *drupal.tar.gz" | md5sum -c -; \
tar -xz --strip-components=1 -f drupal.tar.gz; \
rm drupal.tar.gz; \
chown -R www-data:www-data sites modules themes

# vim:set ft=dockerfile:
21 changes: 14 additions & 7 deletions 8.7/apache/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
FROM php:7.3-apache

# install the PHP extensions we need
RUN set -ex; \
RUN set -eux; \
\
if command -v a2enmod; then \
a2enmod rewrite; \
Expand All @@ -12,13 +12,19 @@ RUN set -ex; \
\
apt-get update; \
apt-get install -y --no-install-recommends \
libfreetype6-dev \
libjpeg-dev \
libpng-dev \
libpq-dev \
libzip-dev \
; \
\
docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr; \
docker-php-ext-configure gd \
--with-freetype-dir=/usr \
--with-jpeg-dir=/usr \
--with-png-dir=/usr \
; \
\
docker-php-ext-install -j "$(nproc)" \
gd \
opcache \
Expand Down Expand Up @@ -57,10 +63,11 @@ WORKDIR /var/www/html
ENV DRUPAL_VERSION 8.7.3
ENV DRUPAL_MD5 bba896a1ed2fbe4a1744d82c036fcfc4

RUN curl -fSL "https://ftp.drupal.org/files/projects/drupal-${DRUPAL_VERSION}.tar.gz" -o drupal.tar.gz \
&& echo "${DRUPAL_MD5} *drupal.tar.gz" | md5sum -c - \
&& tar -xz --strip-components=1 -f drupal.tar.gz \
&& rm drupal.tar.gz \
&& chown -R www-data:www-data sites modules themes
RUN set -eux; \
curl -fSL "https://ftp.drupal.org/files/projects/drupal-${DRUPAL_VERSION}.tar.gz" -o drupal.tar.gz; \
echo "${DRUPAL_MD5} *drupal.tar.gz" | md5sum -c -; \
tar -xz --strip-components=1 -f drupal.tar.gz; \
rm drupal.tar.gz; \
chown -R www-data:www-data sites modules themes

# vim:set ft=dockerfile:
Loading

0 comments on commit f52125f

Please sign in to comment.