Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update backdrop to 1.29.2, and update some image configuration #18171

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Wylbur
Copy link
Contributor

@Wylbur Wylbur commented Dec 28, 2024

The latest backdrop release is now 1.29.2 - https://github.com/backdrop/backdrop/releases/, which was a security release of Backdrop CMS.

We have also updated some of the image config to resolve issues with file locations.

You can see all the repo updates at the backdrop-docker repo, along with the latest merge commit. https://github.com/backdrop-ops/backdrop-docker/commits/master

Here is the latest merge hash
cb21983b4ec3b6fb90e8c12a916684688a3e9118

The latest backdrop release is now 1.29.2 - https://github.com/backdrop/backdrop/releases/, which was a security release of Backdrop CMS. 

We have also updated some of the image config to resolve issues with file locations.  

You can see all the repo updates at the backdrop-docker repo, along with the latest merge commit. 
https://github.com/backdrop-ops/backdrop-docker/commits/master

Here is the latest merge hash 
`cb21983b4ec3b6fb90e8c12a916684688a3e9118`
@Wylbur Wylbur requested a review from a team as a code owner December 28, 2024 20:34

This comment has been minimized.

@tianon
Copy link
Member

tianon commented Jan 2, 2025

+EXPOSE 80 this is a weird addition to the FPM image 😅

@tianon
Copy link
Member

tianon commented Jan 2, 2025

... and the Apache image already has it, so I don't know what either are for 😅

https://github.com/docker-library/php/blob/02b23e01f116224fb7a6969cc13a7cf91d1e6617/8.4/bookworm/apache/Dockerfile#L289

@Wylbur
Copy link
Contributor Author

Wylbur commented Jan 2, 2025

@tianon please help me understand your comments. Should the 'expose' commands be removed from the dockerfile? Are they not needed? Thanks!

This comment has been minimized.

Copy link

github-actions bot commented Jan 3, 2025

Diff for 2b10888:
diff --git a/_bashbrew-cat b/_bashbrew-cat
index 0d8c800..93b1db6 100644
--- a/_bashbrew-cat
+++ b/_bashbrew-cat
@@ -1,12 +1,12 @@
 Maintainers: Mike Pirog <[email protected]> (@pirog), Geoff St. Pierre <[email protected]> (@serundeputy), Jen Lampton <[email protected]> (@jenlampton), Greg Netsas <[email protected]> (@klonos)
 GitRepo: https://github.com/backdrop-ops/backdrop-docker.git
 
-Tags: 1.26.1, 1.26, 1, 1.26.1-apache, 1.26-apache, 1-apache, apache, latest
+Tags: 1.29.1, 1.29, 1, 1.29.1-apache, 1.29-apache, 1-apache, apache, latest
 Architectures: amd64, arm64v8
-GitCommit: 95902d6610b2474ca88ff8faae40ed30e7d3318a
+GitCommit: 4f986f41b86617411c52eefc86b59380312f1751
 Directory: 1/apache
 
-Tags: 1.26.1-fpm, 1.26-fpm, 1-fpm, fpm
+Tags: 1.29.1-fpm, 1.29-fpm, 1-fpm, fpm
 Architectures: amd64, arm64v8
-GitCommit: 95902d6610b2474ca88ff8faae40ed30e7d3318a
+GitCommit: 4f986f41b86617411c52eefc86b59380312f1751
 Directory: 1/fpm
diff --git a/_bashbrew-list b/_bashbrew-list
index 47374f3..b5f815f 100644
--- a/_bashbrew-list
+++ b/_bashbrew-list
@@ -1,12 +1,12 @@
 backdrop:1
 backdrop:1-apache
 backdrop:1-fpm
-backdrop:1.26
-backdrop:1.26-apache
-backdrop:1.26-fpm
-backdrop:1.26.1
-backdrop:1.26.1-apache
-backdrop:1.26.1-fpm
+backdrop:1.29
+backdrop:1.29-apache
+backdrop:1.29-fpm
+backdrop:1.29.1
+backdrop:1.29.1-apache
+backdrop:1.29.1-fpm
 backdrop:apache
 backdrop:fpm
 backdrop:latest
diff --git a/backdrop_fpm/Dockerfile b/backdrop_fpm/Dockerfile
index 97037d1..04dbdae 100644
--- a/backdrop_fpm/Dockerfile
+++ b/backdrop_fpm/Dockerfile
@@ -1,5 +1,5 @@
 # from https://backdropcms.org/requirements
-FROM php:8.1-fpm
+FROM php:8.3-fpm
 
 # install the PHP extensions we need
 RUN apt-get update && apt-get install -y libzip-dev libonig-dev libpng-dev libjpeg-dev libpq-dev \
@@ -10,14 +10,14 @@ RUN apt-get update && apt-get install -y libzip-dev libonig-dev libpng-dev libjp
 WORKDIR /var/www/html
 
 # https://github.com/backdrop/backdrop/releases
-ENV BACKDROP_VERSION 1.26.1
-ENV BACKDROP_MD5 0a6fad09190b1f8da266f586955454a2
+ENV BACKDROP_VERSION=1.29.2
+ENV BACKDROP_MD5=dcb27feb72d78f1f14120d4c9a6bc70b
 
 RUN curl -fSL "https://github.com/backdrop/backdrop/archive/${BACKDROP_VERSION}.tar.gz" -o backdrop.tar.gz \
 	&& echo "${BACKDROP_MD5} *backdrop.tar.gz" | md5sum -c - \
 	&& tar -xz --strip-components=1 -f backdrop.tar.gz \
 	&& rm backdrop.tar.gz \
-	&& chown -R www-data:www-data sites
+	&& chown -R www-data:www-data sites files
 
 # Add custom entrypoint to set BACKDROP_SETTINGS correctly
 COPY docker-entrypoint.sh /entrypoint.sh
diff --git a/backdrop_fpm/docker-entrypoint.sh b/backdrop_fpm/docker-entrypoint.sh
index d2b4fac..45825e2 100755
--- a/backdrop_fpm/docker-entrypoint.sh
+++ b/backdrop_fpm/docker-entrypoint.sh
@@ -39,7 +39,7 @@ if [[ "$1" == apache2* ]] || [ "$1" == php-fpm ]; then
   fi
 
   # lets construct our BACKDROP_SETTINGS and pass them into apache or fpm
-  export BACKDROP_SETTINGS="{\"databases\":{\"default\":{\"default\":{\"host\":\"database\",\"port\":$BACKDROP_DB_PORT,\"username\":\"$BACKDROP_DB_USER\",\"password\":\"$BACKDROP_DB_PASSWORD\",\"database\":\"$BACKDROP_DB_NAME\",\"driver\":\"$BACKDROP_DB_DRIVER\"}}}}"
+  export BACKDROP_SETTINGS="{\"databases\":{\"default\":{\"default\":{\"host\":\"$BACKDROP_DB_HOST\",\"port\":$BACKDROP_DB_PORT,\"username\":\"$BACKDROP_DB_USER\",\"password\":\"$BACKDROP_DB_PASSWORD\",\"database\":\"$BACKDROP_DB_NAME\",\"driver\":\"$BACKDROP_DB_DRIVER\"}}}}"
   if [[ "$1" == apache2* ]]; then
     echo "PassEnv BACKDROP_SETTINGS" > /etc/apache2/conf-enabled/backdrop.conf
   elif [[ "$1" == php-fpm* ]]; then
diff --git a/backdrop_latest/Dockerfile b/backdrop_latest/Dockerfile
index 41061c8..1ce9aea 100644
--- a/backdrop_latest/Dockerfile
+++ b/backdrop_latest/Dockerfile
@@ -1,5 +1,5 @@
 # from https://backdropcms.org/requirements
-FROM php:8.1-apache
+FROM php:8.3-apache
 
 RUN a2enmod rewrite
 
@@ -12,14 +12,14 @@ RUN apt-get update && apt-get install -y --no-install-recommends libzip-dev libo
 WORKDIR /var/www/html
 
 # https://github.com/backdrop/backdrop/releases
-ENV BACKDROP_VERSION 1.26.1
-ENV BACKDROP_MD5 0a6fad09190b1f8da266f586955454a2
+ENV BACKDROP_VERSION=1.29.2
+ENV BACKDROP_MD5=dcb27feb72d78f1f14120d4c9a6bc70b
 
-RUN curl -fSL "https://github.com/backdrop/backdrop/archive/${BACKDROP_VERSION}.tar.gz" -o backdrop.tar.gz \
+RUN curl -fSL "https://github.com/backdrop/backdrop/archive/refs/tags/${BACKDROP_VERSION}.tar.gz" -o backdrop.tar.gz \
   && echo "${BACKDROP_MD5} *backdrop.tar.gz" | md5sum -c - \
   && tar -xz --strip-components=1 -f backdrop.tar.gz \
   && rm backdrop.tar.gz \
-  && chown -R www-data:www-data sites
+  && chown -R www-data:www-data sites files
 
 # Add custom entrypoint to set BACKDROP_SETTINGS correctly
 COPY docker-entrypoint.sh /entrypoint.sh
diff --git a/backdrop_latest/docker-entrypoint.sh b/backdrop_latest/docker-entrypoint.sh
index d2b4fac..45825e2 100755
--- a/backdrop_latest/docker-entrypoint.sh
+++ b/backdrop_latest/docker-entrypoint.sh
@@ -39,7 +39,7 @@ if [[ "$1" == apache2* ]] || [ "$1" == php-fpm ]; then
   fi
 
   # lets construct our BACKDROP_SETTINGS and pass them into apache or fpm
-  export BACKDROP_SETTINGS="{\"databases\":{\"default\":{\"default\":{\"host\":\"database\",\"port\":$BACKDROP_DB_PORT,\"username\":\"$BACKDROP_DB_USER\",\"password\":\"$BACKDROP_DB_PASSWORD\",\"database\":\"$BACKDROP_DB_NAME\",\"driver\":\"$BACKDROP_DB_DRIVER\"}}}}"
+  export BACKDROP_SETTINGS="{\"databases\":{\"default\":{\"default\":{\"host\":\"$BACKDROP_DB_HOST\",\"port\":$BACKDROP_DB_PORT,\"username\":\"$BACKDROP_DB_USER\",\"password\":\"$BACKDROP_DB_PASSWORD\",\"database\":\"$BACKDROP_DB_NAME\",\"driver\":\"$BACKDROP_DB_DRIVER\"}}}}"
   if [[ "$1" == apache2* ]]; then
     echo "PassEnv BACKDROP_SETTINGS" > /etc/apache2/conf-enabled/backdrop.conf
   elif [[ "$1" == php-fpm* ]]; then

Relevant Maintainers:

@Wylbur
Copy link
Contributor Author

Wylbur commented Jan 3, 2025

@tianon I have removed the 'expose' commands, and updated the commit with the latest gitcommit hash. Hopefully that is what is needed!

@Wylbur
Copy link
Contributor Author

Wylbur commented Jan 3, 2025

Those changes came from a pull request we received from @diraneyya , I have asked him to comment on this.

@diraneyya
Copy link

Im curious why the url was updated here: backdrop-ops/backdrop-docker@f7cf038#diff-242595824e0633a36076299aebda0df065ae6883b2b5a8149d3f97d21a7e42caR18

but not here: backdrop-ops/backdrop-docker@f7cf038#diff-1f57cd311d1c7313eb16029866dc2c9e9fc1b7bc4306c69edb285da4dc7a701cR16

This was an omission on my part. Both URLs needed to be updated.

+EXPOSE 80 this is a weird addition to the FPM image 😅

Can you educate me on this, I would like to know why an EXPOSE statement is not a good addition to a Dockerfile.

@Wylbur Both images work, I tested them just now.

Question to all: can you explain to me how the official Docker images are built and pushed to Docker hub? I see that the available tags are outdated but broken images are still being pushed via a Jenkins instance https://doi-janky.infosiftr.net/

The latest tag is assigned to 1.26.1-apache which is really old by now.

Will this merge request fix the problem?

Thanks.

@LaurentGoderre
Copy link
Member

@diraneyya it's not that EXPOSE is not good, it's just that from variant doesn't use port 80 like the Apache variant does.

@LaurentGoderre
Copy link
Member

@diraneyya merging this PR will trigger builds that will produce those tags.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants