Skip to content

Conversation

@apmatthews
Copy link
Member

@apmatthews apmatthews commented Dec 30, 2025

JIRA Ticket

PMAR-290

What Are We Doing Here

Problem

The Docker image is only rebuilt when new versions are released. During periods without releases, the image accumulates security vulnerabilities in the base OS packages.

Solution

Add a monthly scheduled workflow that rebuilds and pushes the Docker image to ensure security patches are applied regularly.

Changes

  • New workflow (.github/workflows/scheduled-rebuild.yml): Rebuilds the Docker image on the 1st of each month, pushing to latest and all versioned tags. Uses no-cache to ensure fresh base image layers.
  • Dockerfile: Replaced instrumentisto/rsync-ssh:alpine3.20 with alpine:3.20 directly. This enables Dependabot to detect Alpine version updates (the previous tag format wasn't recognized). Since alpine:3.23 is available, I'd expect to see a dependabot PR come in within 24 hours bumping this.
  • Documentation (DEVELOPMENT.md): Added maintenance plan covering automatic builds, base image updates, and instructions for handling Dependabot PRs.

Setup Required

Add these repository secrets for the scheduled workflow:
- DOCKERHUB_USERNAME
- DOCKERHUB_TOKEN

I've used my personal username and a personal access token for now. I'm planning to follow up about getting a service account instead.

Testing

After merging, trigger the workflow manually via Actions → Scheduled Docker Rebuild → Run workflow to verify credentials and push access.

@changeset-bot
Copy link

changeset-bot bot commented Dec 30, 2025

🦋 Changeset detected

Latest commit: 1c4e8d7

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@wpengine/site-deploy Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@apmatthews apmatthews force-pushed the PMAR-290/automate-patching branch from d953cc1 to fe2a3ec Compare December 30, 2025 17:37
Dependabot version checks aren't able to detect changes to the base
image because the tag format (i.e. alpine3.20) is not standard semver.
This prevents Dependabot from automatically updating the base image when
a new version is released, creating the need to manually monitor for and
apply base image updates.

The instrumentisto/rsync-ssh base image isn't particularly complex and
we're already running package updates and installing a few additional
dependencies. Therefore, it makes sense to just use alpine directly and
install all of the instrumentisto/rsync-ssh dependencies ourselves. This
should allow Dependabot to automatically update the base image when a
new version is released.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants