Skip to content

docker: use 24.04 for ghcr.io/homebrew/brew#21768

Closed
cho-m wants to merge 1 commit intomainfrom
docker-default
Closed

docker: use 24.04 for ghcr.io/homebrew/brew#21768
cho-m wants to merge 1 commit intomainfrom
docker-default

Conversation

@cho-m
Copy link
Member

@cho-m cho-m commented Mar 19, 2026

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes? Here's an example.
  • Have you successfully run brew lgtm (style, typechecking and tests) with your changes locally?

  • AI was used to generate or assist with generating this PR. Please specify below how you used AI to help you, and what steps you have taken to manually verify the changes.

Part of #21761.

Dockerfile default should be no/low impact change as we don't use the default ARG version.

Searching Homebrew org for ghcr.io/homebrew/brew usage: https://github.com/search?q=org%3AHomebrew+ghcr.io%2Fhomebrew%2Fbrew&type=code, seems to only impact:

  • .devcontainer/devcontainer.json (developer-specific, low impact)
  • Homebrew/brew tests.yml formula-audit, seems safe to run on Ubuntu 24.04:
    formula-audit:
    name: formula audit
    needs: syntax
    if: github.repository_owner == 'Homebrew' && github.event_name != 'push'
    runs-on: ubuntu-latest
    container:
    image: ghcr.io/homebrew/brew:main
    steps:
    - name: Set up Homebrew
    id: set-up-homebrew
    uses: Homebrew/actions/setup-homebrew@main
    with:
    core: true
    cask: false
    - name: Run brew readall on homebrew/core
    run: brew readall --os=all --arch=all --aliases homebrew/core
    - name: Run brew audit --skip-style on homebrew/core
    run: brew audit --skip-style --except=version --tap=homebrew/core
    - name: Generate formula API
    run: brew generate-formula-api --dry-run

Copilot AI review requested due to automatic review settings March 19, 2026 16:08
@cho-m cho-m mentioned this pull request Mar 19, 2026
17 tasks
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the Homebrew Docker image defaults so the canonical ghcr.io/homebrew/brew tags track Ubuntu 24.04, aligning the published “brew” image with the ongoing Ubuntu 24.04 migration work.

Changes:

  • Switch the Dockerfile default base image version from Ubuntu 22.04 to 24.04.
  • Update the Docker publishing workflow so ghcr.io/homebrew/brew:{latest,<version>,main} tags are generated only for the 24.04 build.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
Dockerfile Changes the default ARG version to 24.04 so local/default builds use Ubuntu 24.04.
.github/workflows/docker.yml Moves the ghcr.io/homebrew/brew:* tagging conditions from 22.04 to 24.04 for release and main pushes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Member

@MikeMcQuaid MikeMcQuaid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As long as this doesn't change the default homebrew/core image: seems fine!

"ghcr.io/homebrew/ubuntu${version}:latest"
)
if [[ "${version}" == "22.04" ]]; then
if [[ "${version}" == "24.04" ]]; then
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this change the Homebrew/homebrew-core default CI image?

Copy link
Member Author

@cho-m cho-m Mar 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, this only impacts container label ghcr.io/homebrew/brew which we currently don't use in Homebrew/homebrew-core.

As far as I'm aware, bottling runners is a mix of:


A bit messy as we currently have to update multiple locations. Maybe we should be using a dedicated/unversioned container label for bottling so we don't have to worry about these being updated in-sync.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should be using a dedicated/unversioned container label for bottling so we don't have to worry about these being updated in-sync.

If we want to use ghcr.io/homebrew/brew:main for this, then can close this PR and handle as part of Ubuntu migration PR.

@cho-m cho-m added the discussion Input solicited from others label Mar 19, 2026
@cho-m cho-m marked this pull request as draft March 19, 2026 17:02
@cho-m cho-m marked this pull request as draft March 19, 2026 17:02
@cho-m
Copy link
Member Author

cho-m commented Mar 19, 2026

Actually I prefer the idea of switching workflows to use this container label/tag as the maintenance is a pain trying to modify a couple dozen files.

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

Labels

discussion Input solicited from others

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants