Skip to content
Professor Graham Leach edited this page Dec 30, 2024 · 15 revisions

Intent

This document describes how to produce the Backdrop Docker Official Image(s), which are offered to general public so they may quickly and easily "spin up" a Backdrop CMS instance in a Docker container for educational, operational or evaluative purposes.

Context

The Backdrop Docker Official Image(s) should be renewed whenever there is a new release of Backdrop CMS.

A new release of Backdrop CMS occurs every six months.

The Backdrop Docker Official Image(s) are produced in collaboration with Docker Hub, who only hosts the target files that represent the Backdrop Docker Official Images, along with the tags that lead to those images, and a landing page to join everything together with an explanatory README section.

The Backdrop Docker GitHub Repository area only hosts the source files required for the image production process and the source README section that eventually ends up on the landing Docker Hub page.

This distributed production process results in the availability on DockerHub of two Backdrop Docker Official Images:

  • A MAIN image based on the Apache 2 (apache) web server
  • An ALTERNATE image based on the FastCGI Process Manager (fpm) web server.

Assets

Assets Located on GitHub

Source README.md

The README.md file resides at the root of Backdrop Docker

Source Docker Production Files for MAIN Apache 2 (apache) Image

The files related to the MAIN Backdrop Docker Official Image reside in an apache-specific subdirectory of Backdrop Docker

Source Docker Production Files for ALTERNATE FastCGI Process Manager (fpm) Image

The files related to the MAIN Backdrop Docker Official Image reside in an apache-specific subdirectory of Backdrop Docker

Docker compose.yml Runtime Configuration File for MAIN Image

A compose.yml Docker runtime configuration file needed to be able to successfully "spin up" a Docker container containing an instance of the MAIN Backdrop Docker Official Image.

Docker fpm-compose.yml Runtime Configuration File for ALTERNATE Image

A fpm-compose.yml Docker runtime configuration file needed to be able to successfully "spin up" a Docker container containing an instance of the ALTERNATE Backdrop Docker Official Image.

TODO:

Assets on Located on DockerHub

Docker Official Image(s) for MAIN and ALTERNATE

A set of latest, backdrop, 1-apache, 1-fpm, etc... tags generated by the Docker Hub team for use by the general public while using the docker command

DockerHub Landing Page

The DockerHub landing page features a 1:1 copy of the README.md file that was prepared in the Backdrop Docker GitHub Repository area.

Workflow High Level Overview

  1. The Backdrop CMS Docker Image Project Team issues a internal and external announcements regarding the upcoming availability of new Backdrop Docker Official Image(s).

  2. The Backdrop CMS Docker Image Project Team then assembles the source files needed by Docker Hub in the Backdrop Docker GitHub Repository area.

  3. The Backdrop CMS Docker Image Project Team then issues a notification to the Docker Hub Team informing them of the need to generate new Backdrop Docker Official Image(s).

  4. The Docker Hub Team then uses the assets that have been prepared in the Backdrop Docker GitHub Repository area to generate: (A) New Backdrop Docker Official Image(s); (B) New tags(s) to locate and load a new image via the `docker' command; and (C) A refreshed Docker Hub landing page

  5. The Backdrop CMS Project Team then tests the new Backdrop Docker Official Image(s) to ensure they behave as expected.

  6. Once everything has been validated, the Backdrop CMS Docker Image Project Team then issues internal and external announcements regarding the availability of the new Backdrop Docker Official Image(s).

Workflow Step-by-Step

1. Communications

Internal Messaging

Inform internal stakeholders that a new set of Backdrop Docker Official Images are in production

Backdrop Docker Issue Queue

Create a new issue in the Backdrop Docker issue queue to help track this event.

Subject:

Upcoming Backdrop Docker Official Image

Body:

Hello everyone!  In conjunction with the release of the latest version of Backdrop CMS, the **Backdrop Docker Official Images Team** are currently co-ordinating with the people over at **DockerHub** to generate and host our MAIN and ALTERNATE Docker Official Images, which are currently located at:

https://hub.docker.com/_/backdrop

The MAIN image incorporates the Apache 2 web server (apache), and is the one that is loaded by Docker by default when using our standard `compose.yml` file.

The ALTERNATE image incorporates the FastCGI Process Manager (fmp) web server, and requires customization of the `compose.yml` file to load.  

Both Docker images are intended for general public release, and are extensively documented in the [Backdrop Docker GitHub Repository](https://github.com/backdrop-ops/backdrop-docker).

We expect the production process to be swiftly completed.

Once this topic is marked as "closed" the image(s) will be available.
Zulip

File a new issue in the Backdrop Zulip Area notifying the people there about an upcoming set of Backdrop Docker Official Images available at Docker Hub:

Subject:

Upcoming Backdrop Docker Official Image

Body:

Hello everyone!  In conjunction with the release of the latest version of Backdrop CMS, the **Backdrop Docker Official Images Team** are currently co-ordinating with the people over at **DockerHub** to generate and host our MAIN and ALTERNATE Docker Official Images, which are currently located at:

https://hub.docker.com/_/backdrop

The MAIN image incorporates the Apache 2 web server (apache), and is the one that is loaded by Docker by default when using our standard `compose.yml` file.

The ALTERNATE image incorporates the FastCGI Process Manager (fmp) web server, and requires customization of the `compose.yml` file to load.  

Both Docker images are intended for general public release, and are extensively documented in the [Backdrop Docker GitHub Repository](https://github.com/backdrop-ops/backdrop-docker).

We expect the production process to be swiftly completed.

Once this topic is marked as "resolved" the image(s) will be available.

External Messaging

Inform external stakeholders that a new set of Backdrop Docker Official Images are in production

www.backdrop.org Home Page

TODO:

Press Release

TODO:

2. Assembly

[This area needs validation]

The Backdrop CMS Project Docker Image Team then assemble the assets related to the new release in the Backdrop Docker area.

This process may involve: (A) Updating the README.md file; (B) Updating file(s) concerning the MAIN Backdrop Docker Official Image; (C) Updating file(s) concerning any ALTERNATE Backdrop Docker Official Image(s).

Currently, the following Docker Backdrop Official Images are offered on DockerHub:

  • MAIN: Apache 2 (apache)
  • ALTERNATE: FastCGI Process Manager (fpm)

The source files related to these two offerings are located within the Backdrop Docker area, at:

Update the Backdrop Docker Image You will need 2 things:

  1. The release tag of the latest stable Backdrop CMS version (which is usually the same as the Backdrop version).

  2. The md5 hash of the latest stable Backdrop CMS release:

Download the "Source code" .tar.gz file - NOT the .zip file (it is usually the last item in the list of links bellow the "Assets" section).

Run md5 {filename}.tar.gz or md5sum {filename}.tar.gz depending on your operating system. Make a note of the generated md5 hash

Apache 2 (apache) Files Location

https://github.com/backdrop-ops/backdrop-docker/tree/1/apache/Dockerfile
https://github.com/backdrop-ops/backdrop-docker/tree/1/apache/docker-entrypoint.sh

apache Dockerfile

The Dockerfile contains buildtime instructions needed by the docker build process.

Update 1/apache/Dockerfile: Update ENV BACKDROP_VERSION to the new release tag (point 1 above) Update ENV BACKDROP_MD5 to the new md5 hash (point 2.2 above)

apache docker-entrypoint.sh

The docker-entrypoing.sh file contains runtime instructions executed by Docker when the image is launched in a container.

FastCGI Process Manager (fpm) Files Location

https://github.com/backdrop-ops/backdrop-docker/tree/1/fpm/Dockerfile
https://github.com/backdrop-ops/backdrop-docker/tree/1/fpm/docker-entrypoint.sh

fpm Dockerfile

The Dockerfile contains buildtime instructions needed by the docker build process.

Update 1/fpm/Dockerfile: Update ENV BACKDROP_VERSION to the new release tag (point 1 above) Update ENV BACKDROP_MD5 to the new md5 hash (point 2.2 above)

fpm docker-entrypoint.sh

The docker-entrypoing.sh file contains runtime instructions executed by Docker when the image is launched in a container.

README.md

Update the README.md Update the version numbers in the "Supported tags and respective Dockerfile links" section at the top Confirm the rest of the file is accurate

Travis Tests

Create a Pull Request with all of the changes listed above If Travis tests pass -- Merge the pull request.

Commit Hash

Make a note of the latest commit hash after the pull request has been merged.
You will need it for updating the official docker-library (see next section)

3. Generation

[This area needs work AND validation]

Docker Library Repository Notification

  1. Create a pull request at the Docker library Repository.

The people at Docker Hub people will use the information located at Backdrop Docker Image to produce a landing page for us on DockerHub.com that includes the tags required by Docker to launch Backdrop CMS in a container.

installers need to specify when launching Docker When the pull request is processed, the

  • When the Docker Library pull request is merged, the image is created from the details at Backdrop Docker, and posted at Docker Hub.

Tell the Docker official images to build against the latest source

  • Update the 2 lines starting with Tags:, to reflect the latest version of Backdrop. For example, change from this:

    Tags: 1.29.1, 1.29, 1, 1.29.1-apache, 1.29-apache, 1-apache, apache, latest

    ...to this:

    Tags: 1.29.2, 1.29, 1, 1.29.2-apache, 1.29-apache, 1-apache, apache, latest

  • Update the git commit:

    • Make sure that the PR you have filed in the previous section has been committed -> Head to the commits list of the https://github.com/backdrop-ops/backdrop-docker repo. -> Click on the latest commit which updated the dockerfiles -> the full commit hash should be located at the top-right of the page, below the "Browse files" button.
    • Use the commit hash from the previous step, to update the 2 lines starting with GitCommit:

In order to help the Docker Library maintainers review and merge the PR, make sure to add as much useful info in the PR summary, such as:

Once the pull request is submitted, it will run through automated code testing. If the code passes automated review, the pull request will be reviewed by the code owners. Any issues with the pull request will need to be resolved. When the pull request is approved, you will get notification, and the new image will be become available.

  • After the new image is posted, we test the newly created image to confirm it is working as intended.
  1. Update the Backdrop Docker repository

  2. Create a PR to update the Docker repository

  3. Backdrop CMS images are hosted at Docker Hub

4. Post Generation

[This area needs work AND validation]

5. Testing

The next step is to confirm that the image(s) are working as intended.

The following example uses a Linux host to test the image(s)

mkdir backdrop-apache-test
cd backdrop-apache-test
vi compose.yml

Ensure that compose.yml contains the following:

services:
  backdrop:
    image: backdrop:latest
    ports:
      - 8080:80
    environment:
      BACKDROP_DB_HOST: mysql
      BACKDROP_DB_USER: backdrop
      BACKDROP_DB_PASSWORD: backdrop

  mysql:
    image: mysql
    environment:
      MYSQL_USER: backdrop
      MYSQL_PASSWORD: backdrop
      MYSQL_DATABASE: backdrop
      MYSQL_ALLOW_EMPTY_PASSWORD: 'yes'

Next, test the latest Backdrop CMS DockerHub image using the following command:

docker compose up

The screen will fill up with a LOT of messages. Monitor them for any errors. Usually, after a while (1 or two minutes) the pace of messages will slow down. At that point, a test connection to the Backdrop CMS instance in the Docker container can be attempted.

The Backdrop CMS instance should be available at:

https://localhost:8080

If the web browser is on the same machine as the container, or

https://{ip-address}:8080

Where {ip-address} if the machine hosting docker has a different IP Address than the machine where the browser is being used.

6. Confirmation

If testing is successfully completed, internal and external notifications can be sent out.

Internal Messaging

Inform internal stakeholders that the new Backdrop Docker Official Images are available.

Backdrop Docker Issue Queue

Close the issue created in the Backdrop Docker issue queue by posting the following confirmation message, then tagging the issue as "closed":

Body:

Hello everyone!  The **Backdrop Docker Official Images Team** is pleased to announce the immediate availability of the latest version of Backdrop CMS on **DockerHub**.

Both MAIN and ALTERNATE Docker Official Images are available at:

https://hub.docker.com/_/backdrop

The MAIN image incorporates the Apache 2 web server (apache), and is the one that is loaded by Docker by default when using our standard `compose.yml` file.

The ALTERNATE image incorporates the FastCGI Process Manager (fmp) web server, and requires customization of the `compose.yml` file to load.  

Both Docker images are intended for general public release, and are extensively documented in the [Backdrop Docker GitHub Repository](https://github.com/backdrop-ops/backdrop-docker).

Thank you!
Zulip

Close the issue created in the Backdrop Zulip Area by posting the following confirmation message, then tagging the issue as "resolved":

Body:

Hello everyone!  The **Backdrop Docker Official Images Team** is pleased to announce the immediate availability of the latest version of Backdrop CMS on **DockerHub**.

Both MAIN and ALTERNATE Docker Official Images are available at:

https://hub.docker.com/_/backdrop

The MAIN image incorporates the Apache 2 web server (apache), and is the one that is loaded by Docker by default when using our standard `compose.yml` file.

The ALTERNATE image incorporates the FastCGI Process Manager (fmp) web server, and requires customization of the `compose.yml` file to load.  

Both Docker images are intended for general public release, and are extensively documented in the [Backdrop Docker GitHub Repository](https://github.com/backdrop-ops/backdrop-docker).

Thank you!

External Messaging

Inform external stakeholders that a new set of Backdrop Docker Official Images are in production

www.backdrop.org Home Page

TODO:

Press Release

TODO: