Upgrade fail unsupported Docker Version

Ok here’s how we got it fixed (It is not for the faint of heart)

  1. Upgrade Ubuntu to a version that supports Docker 20+
    We were in Ubuntu 16 I had to get to at least Ubuntu 20 so we did this upgrade twice
RELEASE_UPGRADER_ALLOW_THIRD_PARTY=1 do-release-upgrade
  1. Once we got to Ubuntu 20 we had to Update Docker which Ubuntu refused to do on its own.
sudo apt-get update
sudo apt-get install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc

# Add the repository to Apt sources:
echo \
  "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
  $(. /etc/os-release && echo "${UBUNTU_CODENAME:-$VERSION_CODENAME}") stable" | \
  sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
  1. That got us to docker 28
  2. Then run
./launcher rebuild app

5.This will upgrade your postgress from 13 to 15 see:

6. Once the Db upgraded successfully ran

./launcher rebuild app
  1. This yielded an error about missing column
2025-05-18 14:58:28.208 UTC [1455] discourse@discourse ERROR:  column "require_message" does not exist at character 72
2025-05-18 14:58:28.208 UTC [1455] discourse@discourse STATEMENT:  SELECT id, name, name_key, description, notify_type, auto_action_type, require_message, applies_to, position, enabled, score_type FROM "flags" ORDER BY "flags"."position" ASC
** PLUGIN FAILURE **

You are unable to start Discourse due to this error during plugin
initialization:

PG::UndefinedColumn: ERROR:  column "require_message" does not exist
LINE 1: ..._key, description, notify_type, auto_action_type, require_me...
                                                             ^
  1. At this point there is no way to get the container started, so I went to app.yml and disabled all plugins then ran rebuild again
  2. The app finally rebuilt, then I was able to enter the rails console to add the above column manually.
./launcher enter app
rails db
ActiveRecord::Base.connection.execute("ALTER TABLE flags ADD COLUMN require_message BOOLEAN DEFAULT FALSE;")
exit
exit 
  1. Once the column was present went back i to app.yml and enabled all plugins and did a rebuild again
  2. Rebuild succeeded … and we are up!

Thank you @pfaffman for your prompt response on the weekend no less. We are going to make a new updated droplet and move over. This was suposed to be a quick inplace upgrade from the web interface. But I guess the script doesn’t test docker compatibility. When it upgraded discourse docker then it threw incompatible docker error.

This was fully our fault for saying in such an old version of Ubunutu 16, one of the good and bad things about a stable system is that it tends to linger.

1 Like