Skip to content

fix(cli): support context-less builds via standard input (fixes #2139) - #2147

Open
manideep-malyala wants to merge 1 commit into
apple:mainfrom
manideep-malyala:fix/context-less-build-2139
Open

fix(cli): support context-less builds via standard input (fixes #2139)#2147
manideep-malyala wants to merge 1 commit into
apple:mainfrom
manideep-malyala:fix/context-less-build-2139

Conversation

@manideep-malyala

Copy link
Copy Markdown

Description

This PR addresses issue #2139 by adding support for context-less builds via container build - < Dockerfile, aligning with standard Docker CLI behavior.

Changes Made

  • Validation Bypass: Updated BuildCommand.swift's validate() method so that if contextDir is "-", it correctly bypasses the FileManager.default.fileExists check (which previously threw context dir does not exist -).
  • Dockerfile Defaulting: If no -f is explicitly provided and contextDir is "-", dockerfile correctly defaults to "-" (stdin).
  • Empty Context Initialization: Modified the run() closure to generate and pass an empty temporary directory (empty-context) to the Builder.BuildConfig when contextDir is "-". This satisfies the underlying ContainerBuild engine requirements while gracefully supplying a truly empty context to the builder.

Fixes #2139.

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.

[Request]: container build - for context-less build

1 participant