Skip to content

Fix Docker buildx action - #2706

Merged
wborn merged 5 commits into
masterfrom
fix/docker-buildx
Apr 22, 2026
Merged

wborn merged 5 commits into
masterfrom
fix/docker-buildx

Conversation

@denniskuijs

@denniskuijs denniskuijs commented Apr 22, 2026 •

Copy link
Copy Markdown
Member

The install parameter which configures an alias for docker build was removed in version v3.12.0 of the docker/setup-buildx-action action
(Ref: docker/setup-buildx-action#455)

@denniskuijs
denniskuijs marked this pull request as ready for review April 22, 2026 13:59
Copilot AI review requested due to automatic review settings April 22, 2026 13:59
@sonarqubecloud

Copy link
Copy Markdown

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 CI/CD workflow to accommodate docker/setup-buildx-action@v4.0.0 where the docker build alias behavior changed/was removed.

Changes:

  • Replaces some docker build --push usages with docker buildx ... in the workflow-generated command strings.
  • Updates the deployment image build command to use docker buildx ....
  • Removes install: true from the buildx setup step.

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

Comment thread .github/workflows/ci_cd.yml Outdated
if [ -n "$MANAGER_TAGS" ] || [[ "$DEPLOYMENTS" == *"#ref"* ]] || [ -n "$TEST_UI_CMD" ]; then
if [ -n "$MANAGER_TAGS" ]; then
command="docker build --push --build-arg GIT_COMMIT=$commitSha --platform linux/amd64,linux/aarch64 $MANAGER_TAGS $buildPath && docker build --build-arg GIT_COMMIT=$commitSha --platform ${PLATFORM:-linux/amd64} --load -t openremote/manager:$commitShaShort $buildPath"
command="docker buildx --push --build-arg GIT_COMMIT=$commitSha --platform linux/amd64,linux/aarch64 $MANAGER_TAGS $buildPath && docker build --build-arg GIT_COMMIT=$commitSha --platform ${PLATFORM:-linux/amd64} --load -t openremote/manager:$commitShaShort $buildPath"

Copilot AI Apr 22, 2026

Copy link

Choose a reason for hiding this comment

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

docker buildx requires a subcommand (e.g., build). As written, docker buildx --push ... will fail because --push is a flag for docker buildx build, not for the top-level docker buildx command. Also, the second chained command still uses docker build ... --load, but --load is a buildx-only flag; if the docker build alias was removed, this will also fail. Update both chained builds to use docker buildx build (with --push / --load as needed).

Copilot uses AI. Check for mistakes.
Comment thread .github/workflows/ci_cd.yml Outdated
Comment on lines 507 to 509
command="docker buildx --push --build-arg GIT_COMMIT=$commitSha --platform linux/amd64,linux/aarch64 -t ${{ steps.inputs-and-secrets.outputs.OR_AWS_DEVELOPERS_ACCOUNT_ID }}.dkr.ecr.eu-west-1.amazonaws.com/openremote/manager:SNAPSHOT-$commitShaShort $buildPath && docker build --build-arg GIT_COMMIT=$commitSha --platform ${PLATFORM:-linux/amd64} --load -t openremote/manager:$commitShaShort $buildPath"
else
command="docker build --build-arg GIT_COMMIT=$commitSha --platform ${PLATFORM:-linux/amd64} --load -t openremote/manager:$commitShaShort $buildPath && docker build --build-arg GIT_COMMIT=$commitSha --platform ${OTHER_PLATFORM:-linux/aarch64} -t openremote/manager:$commitShaShort $buildPath"

Copilot AI Apr 22, 2026

Copy link

Choose a reason for hiding this comment

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

Same issue here: docker buildx --push ... is missing the build subcommand, and the chained docker build ... --load will fail if docker build is no longer aliased to buildx. Additionally, the non-snapshot branch below still uses docker build ... --load (and another docker build with --platform) which likely relied on that alias too. Consider switching all docker build invocations in this step that use buildx-only flags (--load / --push) to docker buildx build for consistency and to avoid runtime failures.

Copilot uses AI. Check for mistakes.
Comment thread .github/workflows/ci_cd.yml Outdated

if [ -n "$DEPLOYMENTS" ]; then
command="docker build --build-arg GIT_COMMIT=$commitSha --platform linux/amd64,linux/aarch64 -t openremote/deployment:$commitShaShort $buildPath"
command="docker buildx --build-arg GIT_COMMIT=$commitSha --platform linux/amd64,linux/aarch64 -t openremote/deployment:$commitShaShort $buildPath"

Copilot AI Apr 22, 2026

Copy link

Choose a reason for hiding this comment

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

docker buildx is missing the build subcommand here as well; docker buildx --build-arg ... will be rejected because flags are parsed on docker buildx build. Change this to docker buildx build .... Also verify the intended output: with buildx, a multi-platform build without --push or --load/--output won’t produce a locally tagged image, so if later steps expect openremote/deployment:$commitShaShort to exist, you’ll need --push or a single-platform --load/--output.

Suggested change
command="docker buildx --build-arg GIT_COMMIT=$commitSha --platform linux/amd64,linux/aarch64 -t openremote/deployment:$commitShaShort $buildPath"
command="docker buildx build --build-arg GIT_COMMIT=$commitSha --platform linux/amd64,linux/aarch64 -t openremote/deployment:$commitShaShort $buildPath"

Copilot uses AI. Check for mistakes.
@denniskuijs
denniskuijs marked this pull request as draft April 22, 2026 14:14
@sonarqubecloud

Copy link
Copy Markdown

@denniskuijs
denniskuijs marked this pull request as ready for review April 22, 2026 14:19
@denniskuijs
denniskuijs requested a review from wborn April 22, 2026 14:21
@wborn
wborn merged commit ac78022 into master Apr 22, 2026
3 checks passed
@wborn
wborn deleted the fix/docker-buildx branch April 22, 2026 15:26
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.

3 participants