File tree Expand file tree Collapse file tree 16 files changed +206
-115
lines changed
Expand file tree Collapse file tree 16 files changed +206
-115
lines changed File renamed without changes.
Original file line number Diff line number Diff line change 11# from https://www.drupal.org/docs/8/system-requirements/drupal-8-php-requirements
2- FROM php:7.4-fpm-alpine
2+ FROM php:7.4-fpm-alpine3.12
33
44# install the PHP extensions we need
55# postgresql-dev is needed for https://bugs.alpinelinux.org/issues/3642
File renamed without changes.
Original file line number Diff line number Diff line change @@ -56,17 +56,23 @@ RUN { \
5656 echo 'opcache.fast_shutdown=1' ; \
5757 } > /usr/local/etc/php/conf.d/opcache-recommended.ini
5858
59- WORKDIR /var/www/html
60-
6159# https://www.drupal.org/node/3060/release
6260ENV DRUPAL_VERSION 8.8.8
63- ENV DRUPAL_MD5 c8265f0228ca0306de7b2755e4731a3d
6461
62+ # https://github.com/drupal/drupal/blob/9.0.1/composer.lock#L4052-L4053
63+ COPY --from=composer:1.10 /usr/bin/composer /usr/local/bin/
6564RUN set -eux; \
66- curl -fSL "https://ftp.drupal.org/files/projects/drupal-${DRUPAL_VERSION}.tar.gz" -o drupal.tar.gz; \
67- echo "${DRUPAL_MD5} *drupal.tar.gz" | md5sum -c -; \
68- tar -xz --strip-components=1 -f drupal.tar.gz; \
69- rm drupal.tar.gz; \
70- chown -R www-data:www-data sites modules themes
65+ export COMPOSER_HOME="$(mktemp -d)" ; \
66+ cd /var/www/; \
67+ # composer won't install to a non-empty dir: 'Project directory "/var/www/" is not empty.'
68+ rmdir /var/www/html; \
69+ composer create-project --no-install "drupal/recommended-project:$DRUPAL_VERSION" ./; \
70+ sed -i 's!web/!html/!g' composer.json; \
71+ composer install; \
72+ cd html; \
73+ chown -R www-data:www-data sites modules themes; \
74+ # delete composer cache
75+ rm -rf "$COMPOSER_HOME"
7176
77+ WORKDIR /var/www/html
7278# vim:set ft=dockerfile:
Original file line number Diff line number Diff line change 11# from https://www.drupal.org/docs/8/system-requirements/drupal-8-php-requirements
2- FROM php:7.4-fpm-alpine
2+ FROM php:7.4-fpm-alpine3.12
33
44# install the PHP extensions we need
55# postgresql-dev is needed for https://bugs.alpinelinux.org/issues/3642
@@ -46,17 +46,23 @@ RUN { \
4646 echo 'opcache.fast_shutdown=1' ; \
4747 } > /usr/local/etc/php/conf.d/opcache-recommended.ini
4848
49- WORKDIR /var/www/html
50-
5149# https://www.drupal.org/node/3060/release
5250ENV DRUPAL_VERSION 8.8.8
53- ENV DRUPAL_MD5 c8265f0228ca0306de7b2755e4731a3d
5451
52+ # https://github.com/drupal/drupal/blob/9.0.1/composer.lock#L4052-L4053
53+ COPY --from=composer:1.10 /usr/bin/composer /usr/local/bin/
5554RUN set -eux; \
56- curl -fSL "https://ftp.drupal.org/files/projects/drupal-${DRUPAL_VERSION}.tar.gz" -o drupal.tar.gz; \
57- echo "${DRUPAL_MD5} *drupal.tar.gz" | md5sum -c -; \
58- tar -xz --strip-components=1 -f drupal.tar.gz; \
59- rm drupal.tar.gz; \
60- chown -R www-data:www-data sites modules themes
55+ export COMPOSER_HOME="$(mktemp -d)" ; \
56+ cd /var/www/; \
57+ # composer won't install to a non-empty dir: 'Project directory "/var/www/" is not empty.'
58+ rmdir /var/www/html; \
59+ composer create-project --no-install "drupal/recommended-project:$DRUPAL_VERSION" ./; \
60+ sed -i 's!web/!html/!g' composer.json; \
61+ composer install; \
62+ cd html; \
63+ chown -R www-data:www-data sites modules themes; \
64+ # delete composer cache
65+ rm -rf "$COMPOSER_HOME"
6166
67+ WORKDIR /var/www/html
6268# vim:set ft=dockerfile:
Original file line number Diff line number Diff line change @@ -56,17 +56,23 @@ RUN { \
5656 echo 'opcache.fast_shutdown=1' ; \
5757 } > /usr/local/etc/php/conf.d/opcache-recommended.ini
5858
59- WORKDIR /var/www/html
60-
6159# https://www.drupal.org/node/3060/release
6260ENV DRUPAL_VERSION 8.8.8
63- ENV DRUPAL_MD5 c8265f0228ca0306de7b2755e4731a3d
6461
62+ # https://github.com/drupal/drupal/blob/9.0.1/composer.lock#L4052-L4053
63+ COPY --from=composer:1.10 /usr/bin/composer /usr/local/bin/
6564RUN set -eux; \
66- curl -fSL "https://ftp.drupal.org/files/projects/drupal-${DRUPAL_VERSION}.tar.gz" -o drupal.tar.gz; \
67- echo "${DRUPAL_MD5} *drupal.tar.gz" | md5sum -c -; \
68- tar -xz --strip-components=1 -f drupal.tar.gz; \
69- rm drupal.tar.gz; \
70- chown -R www-data:www-data sites modules themes
65+ export COMPOSER_HOME="$(mktemp -d)" ; \
66+ cd /var/www/; \
67+ # composer won't install to a non-empty dir: 'Project directory "/var/www/" is not empty.'
68+ rmdir /var/www/html; \
69+ composer create-project --no-install "drupal/recommended-project:$DRUPAL_VERSION" ./; \
70+ sed -i 's!web/!html/!g' composer.json; \
71+ composer install; \
72+ cd html; \
73+ chown -R www-data:www-data sites modules themes; \
74+ # delete composer cache
75+ rm -rf "$COMPOSER_HOME"
7176
77+ WORKDIR /var/www/html
7278# vim:set ft=dockerfile:
Original file line number Diff line number Diff line change @@ -56,17 +56,23 @@ RUN { \
5656 echo 'opcache.fast_shutdown=1' ; \
5757 } > /usr/local/etc/php/conf.d/opcache-recommended.ini
5858
59- WORKDIR /var/www/html
60-
6159# https://www.drupal.org/node/3060/release
6260ENV DRUPAL_VERSION 8.9.2
63- ENV DRUPAL_MD5 f3f64fbef97831efd1c943f392975f45
6461
62+ # https://github.com/drupal/drupal/blob/9.0.1/composer.lock#L4052-L4053
63+ COPY --from=composer:1.10 /usr/bin/composer /usr/local/bin/
6564RUN set -eux; \
66- curl -fSL "https://ftp.drupal.org/files/projects/drupal-${DRUPAL_VERSION}.tar.gz" -o drupal.tar.gz; \
67- echo "${DRUPAL_MD5} *drupal.tar.gz" | md5sum -c -; \
68- tar -xz --strip-components=1 -f drupal.tar.gz; \
69- rm drupal.tar.gz; \
70- chown -R www-data:www-data sites modules themes
65+ export COMPOSER_HOME="$(mktemp -d)" ; \
66+ cd /var/www/; \
67+ # composer won't install to a non-empty dir: 'Project directory "/var/www/" is not empty.'
68+ rmdir /var/www/html; \
69+ composer create-project --no-install "drupal/recommended-project:$DRUPAL_VERSION" ./; \
70+ sed -i 's!web/!html/!g' composer.json; \
71+ composer install; \
72+ cd html; \
73+ chown -R www-data:www-data sites modules themes; \
74+ # delete composer cache
75+ rm -rf "$COMPOSER_HOME"
7176
77+ WORKDIR /var/www/html
7278# vim:set ft=dockerfile:
Original file line number Diff line number Diff line change 11# from https://www.drupal.org/docs/8/system-requirements/drupal-8-php-requirements
2- FROM php:7.4-fpm-alpine
2+ FROM php:7.4-fpm-alpine3.12
33
44# install the PHP extensions we need
55# postgresql-dev is needed for https://bugs.alpinelinux.org/issues/3642
@@ -46,17 +46,23 @@ RUN { \
4646 echo 'opcache.fast_shutdown=1' ; \
4747 } > /usr/local/etc/php/conf.d/opcache-recommended.ini
4848
49- WORKDIR /var/www/html
50-
5149# https://www.drupal.org/node/3060/release
5250ENV DRUPAL_VERSION 8.9.2
53- ENV DRUPAL_MD5 f3f64fbef97831efd1c943f392975f45
5451
52+ # https://github.com/drupal/drupal/blob/9.0.1/composer.lock#L4052-L4053
53+ COPY --from=composer:1.10 /usr/bin/composer /usr/local/bin/
5554RUN set -eux; \
56- curl -fSL "https://ftp.drupal.org/files/projects/drupal-${DRUPAL_VERSION}.tar.gz" -o drupal.tar.gz; \
57- echo "${DRUPAL_MD5} *drupal.tar.gz" | md5sum -c -; \
58- tar -xz --strip-components=1 -f drupal.tar.gz; \
59- rm drupal.tar.gz; \
60- chown -R www-data:www-data sites modules themes
55+ export COMPOSER_HOME="$(mktemp -d)" ; \
56+ cd /var/www/; \
57+ # composer won't install to a non-empty dir: 'Project directory "/var/www/" is not empty.'
58+ rmdir /var/www/html; \
59+ composer create-project --no-install "drupal/recommended-project:$DRUPAL_VERSION" ./; \
60+ sed -i 's!web/!html/!g' composer.json; \
61+ composer install; \
62+ cd html; \
63+ chown -R www-data:www-data sites modules themes; \
64+ # delete composer cache
65+ rm -rf "$COMPOSER_HOME"
6166
67+ WORKDIR /var/www/html
6268# vim:set ft=dockerfile:
Original file line number Diff line number Diff line change @@ -56,17 +56,23 @@ RUN { \
5656 echo 'opcache.fast_shutdown=1' ; \
5757 } > /usr/local/etc/php/conf.d/opcache-recommended.ini
5858
59- WORKDIR /var/www/html
60-
6159# https://www.drupal.org/node/3060/release
6260ENV DRUPAL_VERSION 8.9.2
63- ENV DRUPAL_MD5 f3f64fbef97831efd1c943f392975f45
6461
62+ # https://github.com/drupal/drupal/blob/9.0.1/composer.lock#L4052-L4053
63+ COPY --from=composer:1.10 /usr/bin/composer /usr/local/bin/
6564RUN set -eux; \
66- curl -fSL "https://ftp.drupal.org/files/projects/drupal-${DRUPAL_VERSION}.tar.gz" -o drupal.tar.gz; \
67- echo "${DRUPAL_MD5} *drupal.tar.gz" | md5sum -c -; \
68- tar -xz --strip-components=1 -f drupal.tar.gz; \
69- rm drupal.tar.gz; \
70- chown -R www-data:www-data sites modules themes
65+ export COMPOSER_HOME="$(mktemp -d)" ; \
66+ cd /var/www/; \
67+ # composer won't install to a non-empty dir: 'Project directory "/var/www/" is not empty.'
68+ rmdir /var/www/html; \
69+ composer create-project --no-install "drupal/recommended-project:$DRUPAL_VERSION" ./; \
70+ sed -i 's!web/!html/!g' composer.json; \
71+ composer install; \
72+ cd html; \
73+ chown -R www-data:www-data sites modules themes; \
74+ # delete composer cache
75+ rm -rf "$COMPOSER_HOME"
7176
77+ WORKDIR /var/www/html
7278# vim:set ft=dockerfile:
Original file line number Diff line number Diff line change @@ -56,17 +56,23 @@ RUN { \
5656 echo 'opcache.fast_shutdown=1' ; \
5757 } > /usr/local/etc/php/conf.d/opcache-recommended.ini
5858
59- WORKDIR /var/www/html
60-
6159# https://www.drupal.org/node/3060/release
62- ENV DRUPAL_VERSION 9.0.1
63- ENV DRUPAL_MD5 18470946d20909e4762c143ff6684372
60+ ENV DRUPAL_VERSION 9.0.2
6461
62+ # https://github.com/drupal/drupal/blob/9.0.1/composer.lock#L4052-L4053
63+ COPY --from=composer:1.10 /usr/bin/composer /usr/local/bin/
6564RUN set -eux; \
66- curl -fSL "https://ftp.drupal.org/files/projects/drupal-${DRUPAL_VERSION}.tar.gz" -o drupal.tar.gz; \
67- echo "${DRUPAL_MD5} *drupal.tar.gz" | md5sum -c -; \
68- tar -xz --strip-components=1 -f drupal.tar.gz; \
69- rm drupal.tar.gz; \
70- chown -R www-data:www-data sites modules themes
65+ export COMPOSER_HOME="$(mktemp -d)" ; \
66+ cd /var/www/; \
67+ # composer won't install to a non-empty dir: 'Project directory "/var/www/" is not empty.'
68+ rmdir /var/www/html; \
69+ composer create-project --no-install "drupal/recommended-project:$DRUPAL_VERSION" ./; \
70+ sed -i 's!web/!html/!g' composer.json; \
71+ composer install; \
72+ cd html; \
73+ chown -R www-data:www-data sites modules themes; \
74+ # delete composer cache
75+ rm -rf "$COMPOSER_HOME"
7176
77+ WORKDIR /var/www/html
7278# vim:set ft=dockerfile:
You can’t perform that action at this time.
0 commit comments