Skip to content

Unpin docker buildx in the Github workflow #360

Open
@amarburg

Description

@amarburg

Feature Type

Adding new functionality to the BlueROV2 driver

Problem Description

As discovered while testing #358, recent versions of docker/buildx change the handling of "empty" configuration values. In .github/workflows/docker.yaml, we use an empty configuration value to "unset" the default cache-to on all targets and disable storage of build cache on PR builds:

          set: |
            *.platform=linux/amd64
            *.cache-from=type=registry,ref=ghcr.io/${{ steps.lowercase-repo.outputs.repository }}:cache-${{ matrix.ROS_DISTRO }}
            *.cache-to=

By default, docker/bake-action uses a recent version of docker/buildx. The above syntax worked previously but broke on or around buildx v.0.19.2.

As a short term fix, #358 pins buildx to v0.18.0. Note this is pinning of docker/buildx as called from bake-action, not of the docker/bake-action github workflow action itself.

By default this regression only affects the Github workflow, not command line builds. It can be replicated on a machine running buildx v0.19.2 -- at present this is the version installed for Ubuntu 24.04 from the Docker repository -- with (in a blue checkout):

cd .docker
docker buildx bake --set "*.cache-to="

On my 24.04 machine:

$ docker buildx version
github.com/docker/buildx v0.19.2 1fc5647

$ docker buildx bake --set "*.cache-to="
[+] Building 0.0s (1/1) FINISHED             docker-container:container-builder
 => [internal] load local bake definitions                                 0.0s
 => => reading docker-bake.hcl 2.39kB / 2.39kB                             0.0s
 => => reading docker-bake.override.hcl 170B / 170B                        0.0s
ERROR: EOF

I plan to produce a MWE and submit a bug to buildx ; again it may be a "true bug" or resolved by a change of syntax, but it breaks existing syntax.

Feature Description

Check if this issue can be resolved either by using a different syntax for the *.cache-to= or more recent versions of docker/buildx Should then be possible to un-pin the version in the workflow file.

Alternative Solutions

n/a

Additional Context

No response

Metadata

Metadata

Assignees

Labels

needs triageThis issue needs triage support

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions