docker-library / drupal

Docker Official Image packaging for Drupal
280 stars 204 forks source link

Add 9.0, "buster" aliases, and use "drupal/recommended-project" layout #176

Closed yosifkit closed 4 years ago

yosifkit commented 4 years ago

Fixes #169 Closes #175

The drupal/recommended-project is adjusted to use html/ instead of web/ so there is no effect to 8.8 and 8.9 except vendor (and composer.{json,lock}) moving to /var/www:

diff -U 4  <(docker run -i --rm drupal:8.9 sh -c 'pwd; ls -a; echo; echo '../'; ls -a ../') <(docker run -i --rm drupal:8.9-new sh -c 'pwd; ls -a; echo; echo '../'; ls -a ../')
--- /dev/fd/63  2020-07-16 17:18:04.850623647 -0700
+++ /dev/fd/62  2020-07-16 17:18:04.850623647 -0700
@@ -1,20 +1,15 @@
 /var/www/html
 .
 ..
 .csslintrc
-.editorconfig
 .eslintignore
 .eslintrc.json
-.gitattributes
 .ht.router.php
 .htaccess
 INSTALL.txt
-LICENSE.txt
 README.txt
 autoload.php
-composer.json
-composer.lock
 core
 example.gitignore
 index.php
 modules
@@ -22,11 +17,15 @@
 robots.txt
 sites
 themes
 update.php
-vendor
 web.config

 ../
 .
 ..
+.editorconfig
+.gitattributes
+composer.json
+composer.lock
 html
+vendor

New tags:

diff -u ../official-images/library/drupal <(./generate-stackbrew-library.sh)
--- ../official-images/library/drupal   2020-07-09 17:04:35.585703412 -0700
+++ /dev/fd/63  2020-07-16 17:01:56.305313625 -0700
@@ -1,50 +1,65 @@
-# this file is generated via https://github.com/docker-library/drupal/blob/ceed8c29e38959d66e28554ec9aae1cc65a66a9d/generate-stackbrew-library.sh
+# this file is generated via https://github.com/docker-library/drupal/blob/999ac2500a68be029d7218a8f921200d2996e51a/generate-stackbrew-library.sh

 Maintainers: Tianon Gravi <admwiggin@gmail.com> (@tianon),
              Joseph Ferguson <yosifkit@gmail.com> (@yosifkit)
 GitRepo: https://github.com/docker-library/drupal.git

-Tags: 8.9.2-apache, 8.9-apache, 8-apache, apache, 8.9.2, 8.9, 8, latest
+Tags: 9.0.2-apache-buster, 9.0-apache-buster, 9-apache-buster, apache-buster, 9.0.2-apache, 9.0-apache, 9-apache, apache, 9.0.2, 9.0, 9, latest
 Architectures: amd64, arm32v5, arm32v7, arm64v8, i386, mips64le, ppc64le, s390x
-GitCommit: e382bbf87765657ae8761e404cb3e4b28674c40b
-Directory: 8.9/apache
+GitCommit: 078526440cf067eb9ef196fdd9a61d0cd842df52
+Directory: 9.0/apache-buster

-Tags: 8.9.2-fpm, 8.9-fpm, 8-fpm, fpm
+Tags: 9.0.2-fpm-buster, 9.0-fpm-buster, 9-fpm-buster, fpm-buster, 9.0.2-fpm, 9.0-fpm, 9-fpm, fpm
 Architectures: amd64, arm32v5, arm32v7, arm64v8, i386, mips64le, ppc64le, s390x
-GitCommit: e382bbf87765657ae8761e404cb3e4b28674c40b
-Directory: 8.9/fpm
+GitCommit: 078526440cf067eb9ef196fdd9a61d0cd842df52
+Directory: 9.0/fpm-buster

-Tags: 8.9.2-fpm-alpine, 8.9-fpm-alpine, 8-fpm-alpine, fpm-alpine
+Tags: 9.0.2-fpm-alpine3.12, 9.0-fpm-alpine3.12, 9-fpm-alpine3.12, fpm-alpine3.12, 9.0.2-fpm-alpine, 9.0-fpm-alpine, 9-fpm-alpine, fpm-alpine
 Architectures: amd64, arm32v6, arm32v7, arm64v8, i386, ppc64le, s390x
-GitCommit: e382bbf87765657ae8761e404cb3e4b28674c40b
-Directory: 8.9/fpm-alpine
+GitCommit: 078526440cf067eb9ef196fdd9a61d0cd842df52
+Directory: 9.0/fpm-alpine3.12

-Tags: 8.8.8-apache, 8.8-apache, 8.8.8, 8.8
+Tags: 8.9.2-apache-buster, 8.9-apache-buster, 8-apache-buster, 8.9.2-apache, 8.9-apache, 8-apache, 8.9.2, 8.9, 8
 Architectures: amd64, arm32v5, arm32v7, arm64v8, i386, mips64le, ppc64le, s390x
-GitCommit: 8194d369e4ac30f2858c57f225133316d71fd04b
-Directory: 8.8/apache
+GitCommit: 078526440cf067eb9ef196fdd9a61d0cd842df52
+Directory: 8.9/apache-buster

-Tags: 8.8.8-fpm, 8.8-fpm
+Tags: 8.9.2-fpm-buster, 8.9-fpm-buster, 8-fpm-buster, 8.9.2-fpm, 8.9-fpm, 8-fpm
 Architectures: amd64, arm32v5, arm32v7, arm64v8, i386, mips64le, ppc64le, s390x
-GitCommit: 8194d369e4ac30f2858c57f225133316d71fd04b
-Directory: 8.8/fpm
+GitCommit: 078526440cf067eb9ef196fdd9a61d0cd842df52
+Directory: 8.9/fpm-buster

-Tags: 8.8.8-fpm-alpine, 8.8-fpm-alpine
+Tags: 8.9.2-fpm-alpine3.12, 8.9-fpm-alpine3.12, 8-fpm-alpine3.12, 8.9.2-fpm-alpine, 8.9-fpm-alpine, 8-fpm-alpine
 Architectures: amd64, arm32v6, arm32v7, arm64v8, i386, ppc64le, s390x
-GitCommit: 8194d369e4ac30f2858c57f225133316d71fd04b
-Directory: 8.8/fpm-alpine
+GitCommit: 078526440cf067eb9ef196fdd9a61d0cd842df52
+Directory: 8.9/fpm-alpine3.12

-Tags: 7.72-apache, 7-apache, 7.72, 7
+Tags: 8.8.8-apache-buster, 8.8-apache-buster, 8.8.8-apache, 8.8-apache, 8.8.8, 8.8
 Architectures: amd64, arm32v5, arm32v7, arm64v8, i386, mips64le, ppc64le, s390x
-GitCommit: 5c214244f66447edfb98c2091f85df32c9f00f52
-Directory: 7/apache
+GitCommit: 078526440cf067eb9ef196fdd9a61d0cd842df52
+Directory: 8.8/apache-buster

-Tags: 7.72-fpm, 7-fpm
+Tags: 8.8.8-fpm-buster, 8.8-fpm-buster, 8.8.8-fpm, 8.8-fpm
 Architectures: amd64, arm32v5, arm32v7, arm64v8, i386, mips64le, ppc64le, s390x
-GitCommit: 5c214244f66447edfb98c2091f85df32c9f00f52
-Directory: 7/fpm
+GitCommit: 078526440cf067eb9ef196fdd9a61d0cd842df52
+Directory: 8.8/fpm-buster

-Tags: 7.72-fpm-alpine, 7-fpm-alpine
+Tags: 8.8.8-fpm-alpine3.12, 8.8-fpm-alpine3.12, 8.8.8-fpm-alpine, 8.8-fpm-alpine
 Architectures: amd64, arm32v6, arm32v7, arm64v8, i386, ppc64le, s390x
-GitCommit: 5c214244f66447edfb98c2091f85df32c9f00f52
-Directory: 7/fpm-alpine
+GitCommit: 078526440cf067eb9ef196fdd9a61d0cd842df52
+Directory: 8.8/fpm-alpine3.12
+
+Tags: 7.72-apache-buster, 7-apache-buster, 7.72-apache, 7-apache, 7.72, 7
+Architectures: amd64, arm32v5, arm32v7, arm64v8, i386, mips64le, ppc64le, s390x
+GitCommit: 078526440cf067eb9ef196fdd9a61d0cd842df52
+Directory: 7/apache-buster
+
+Tags: 7.72-fpm-buster, 7-fpm-buster, 7.72-fpm, 7-fpm
+Architectures: amd64, arm32v5, arm32v7, arm64v8, i386, mips64le, ppc64le, s390x
+GitCommit: 078526440cf067eb9ef196fdd9a61d0cd842df52
+Directory: 7/fpm-buster
+
+Tags: 7.72-fpm-alpine3.12, 7-fpm-alpine3.12, 7.72-fpm-alpine, 7-fpm-alpine
+Architectures: amd64, arm32v6, arm32v7, arm64v8, i386, ppc64le, s390x
+GitCommit: 078526440cf067eb9ef196fdd9a61d0cd842df52
+Directory: 7/fpm-alpine3.12
tianon commented 4 years ago

@skyred if you can spare some time to review this, it would be very much appreciated! :pray: :heart:

skyred commented 4 years ago

Thank you for asking. I will be happy to

yosifkit commented 4 years ago

Basically the same diff as before but the workdir is relatively one level up (to support RUN composer require ...) and moved under /opt.

diff -U 4  <(docker run -i --rm drupal:8.9 sh -c 'pwd; ls -a; echo; echo '../'; ls -a ../') <(docker run -i --rm drupal:8.9-new sh -c 'echo "$PWD/web"; ls -a web/; echo; echo './'; ls -a ./')
--- /dev/fd/63  2020-08-05 15:05:43.442129748 -0700
+++ /dev/fd/62  2020-08-05 15:05:43.443129771 -0700
@@ -1,20 +1,15 @@
-/var/www/html
+/opt/drupal/web
 .
 ..
 .csslintrc
-.editorconfig
 .eslintignore
 .eslintrc.json
-.gitattributes
 .ht.router.php
 .htaccess
 INSTALL.txt
-LICENSE.txt
 README.txt
 autoload.php
-composer.json
-composer.lock
 core
 example.gitignore
 index.php
 modules
@@ -22,11 +17,15 @@
 robots.txt
 sites
 themes
 update.php
-vendor
 web.config

-../
+./
 .
 ..
-html
+.editorconfig
+.gitattributes
+composer.json
+composer.lock
+vendor
+web
tianon commented 4 years ago

Just copying the excellent use case/example from https://github.com/docker-library/drupal/pull/176#discussion_r465957418 so we don't lose it; this will make things like the following possible:

FROM drupal:8.9
RUN composer require 'drupal/paragraphs:^1.12'