Updates

Find image updates, read what they change and take them. Stop a change with Ctrl+C.

Image checks

seawall images check                 # ask each running container's registry
seawall images ls                    # what the last check found
seawall images explain nextcloud         # one container in full
seawall images compare nginx:1.25.0 nginx:1.31.6

The check runs every day at 06:00 UTC. timers.updates and timers.zone change the time and the zone. It asks each registry for a newer release in the same major and for new majors. Trivy scans the running image and the candidate. The check counts the Critical and High CVEs an update fixes. It changes no stack. The update alerts fire from its results. After an update the check runs again in the background.

No registry knows an image built on this host, so the check skips it. A service with build: in its stack's compose file is one. images check lists these as ignored. To follow the image one is built from, name its container and base under [updates.local_builds].

Taking an update

seawall images ls                        # pending updates from the last check
seawall stack update nextcloud               # what changes
seawall stack update nextcloud --yes
seawall stack update nextcloud --major --yes # a new major version
seawall stack update --all --yes         # every same-major update

An update moves only the image tag. It refuses a stack whose disk copy already differs from what runs. The dry run compares the new image with the running one and with what the compose file does.

An update dry run showing the image move and the CVEs it fixes
A dry run shows the move, the CVEs it fixes and what changes in the image.

Lines marked ! need checking before --yes. They cover a new data folder the compose doesn't mount, a new user when the compose sets none, a dropped setting the compose sets and a dropped port it publishes. When the image names its GitHub source the dry run lists the releases in between. A database major never goes back. Postgres goes up a major only onto data files of the new major or a new volume, with a dump restored into it. A MySQL or MariaDB major, and a Postgres major onto a new volume, need a dump that passed a restore test in the last 24 hours, or --data-backed-up. The same gate runs on deploy, rollback and start.

stack ls and the Stacks tab show each stack's pending updates.

The Stacks tab with its Update column
The Update column. Yellow marks High fixes and red Critical ones.

Automatic updates

seawall updates plan                 # what the next night's run would take, and why

Off by default. [updates.auto] sets a level in default and one for any stack in [updates.auto.stacks]: off, same-version, security, minor or major. The window is 03:00-05:00 on the host's clock unless window says otherwise. seawall-autoupdate.timer runs hourly and the unit takes nothing outside the window or from a stack set to off.

This build's unattended run takes security updates only, one stack at a time, each through the same backup, deploy and rollback as stack update. A candidate waits 3 days after seawall first sees it. The night stops at the first rollback. A stack that runs seawall's monitoring, logging or security, the proxy or the manager is never updated unattended.

Interrupting a change

Press Ctrl+C during an update, deploy, rollback, stop or start. Before the stack's manager (Portainer or Compose) takes over, seawall starts the containers it stopped again. A container still saving is started once it exits. A background waiter does that and gives up after the container's grace period plus 30 seconds (5 minutes at least). In that time a plain docker stop of that container is undone.

After it takes over, the deploy finishes on its own. seawall says where it stopped. If the disk copy wasn't written it names the command to end the drift.

! stopped during the deploy: Portainer finishes it on its own
! the disk copy wasn't updated: `seawall stack reconcile nextcloud --take deployed`
The run pane after Ctrl+C during a stop
The run pane after Ctrl+C.