Skip to content

Conversation

@realrajaryan
Copy link
Contributor

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update

Motivation and Context

BuildKit returns nil ref for Dockerfiles containing only metadata (ENV/ARG/LABEL) directives without filesystem operations (RUN/COPY/ADD). Previously, this caused builds to fail with "no build directives" error.

Builder-shim 0.6.3 fixes this by creating a minimal marker layer when ref is nil but image config is valid, satisfying OCI manifest requirements.

Also, added some tests for this behavior.

Testing

  • Tested locally
  • Added/updated tests
  • Added/updated docs

@jglogan jglogan merged commit 13a2f1a into apple:main Oct 30, 2025
2 checks passed
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.

[Bug]: "Error: unknown (2): failed to solve: no build directives" on environment-only container-file build (0.5.0)

2 participants