Skip to content

Conversation

@josead
Copy link
Member

@josead josead commented Dec 8, 2025

…uilds

The Docker Hub workflow had several issues preventing images from building correctly when there was no local cache:

  1. Each docker buildx bake call was independent, so dependent images (dev->deps, runtime->dev, cli->runtime) couldn't find their base images

  2. Syntax error in manifest creation loop (missing opening quote)

  3. Deprecated ::set-output GitHub Actions syntax

Changes:

  • Add docker-bake.hcl with proper target dependencies using contexts to allow BuildX to resolve image dependencies within a single build
  • Update sub_platform() to use single bake command instead of 4 separate calls
  • Add Dockerfile.dockerignore files for BuildKit's per-dockerfile ignore support
  • Fix syntax error in docker-hub.yml manifest creation
  • Update to modern $GITHUB_OUTPUT syntax
  • Add depends_on to docker-compose.yml for proper service ordering

Description

Please include a summary of the change and which issue is fixed. List any dependencies that are required for this change.

Fixes #(issue_no)

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update
  • Documentation update

Checklist:

  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • My changes generate no new warnings.
  • I have added tests/screenshots (if any) that prove my fix is effective or that my feature works.
  • I have tested the tests implicated (if any) by my own code and they pass (make test or ctest -VV -R <test-name>).
  • If my change is significant or breaking, I have passed all tests with ./docker-compose.sh test &> output and attached the output.
  • I have tested my code with OPTION_BUILD_ADDRESS_SANITIZER or ./docker-compose.sh test-address-sanitizer &> output and OPTION_TEST_MEMORYCHECK.
  • I have tested my code with OPTION_BUILD_THREAD_SANITIZER or ./docker-compose.sh test-thread-sanitizer &> output.
  • I have tested with Helgrind in case my code works with threading.
  • I have run make clang-format in order to format my code and my code follows the style guidelines.

If you are unclear about any of the above checks, have a look at our documentation here.

…uilds

The Docker Hub workflow had several issues preventing images from building
correctly when there was no local cache:

1. Each `docker buildx bake` call was independent, so dependent images
   (dev->deps, runtime->dev, cli->runtime) couldn't find their base images

2. Syntax error in manifest creation loop (missing opening quote)

3. Deprecated `::set-output` GitHub Actions syntax

Changes:
- Add docker-bake.hcl with proper target dependencies using `contexts`
  to allow BuildX to resolve image dependencies within a single build
- Update sub_platform() to use single bake command instead of 4 separate calls
- Add Dockerfile.dockerignore files for BuildKit's per-dockerfile ignore support
- Fix syntax error in docker-hub.yml manifest creation
- Update to modern $GITHUB_OUTPUT syntax
- Add depends_on to docker-compose.yml for proper service ordering
The test step was failing because docker buildx was trying to pull
metacall/core:cli from Docker Hub instead of using the locally built
image. This happened because buildx for cross-platform builds doesn't
automatically resolve base images from the local Docker daemon.

Use --build-context with docker-image:// prefix to explicitly tell
buildx to use the local image as the base for the test Dockerfile.
The --build-context with docker-image:// still fails because buildx
tries to match platform metadata in the manifest. Instead, run tests
directly in the container using docker run with --platform flag.

QEMU is already configured from the bake step, so cross-platform
container execution works via emulation. This completely avoids
the buildx base image resolution issues for cross-platform builds.
@josead josead marked this pull request as draft December 10, 2025 02:00
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