Skip to content

Add Apple Container as a build-capable runtime#509

Merged
ptone merged 2 commits into
GoogleCloudPlatform:mainfrom
ptone:scion/apple-container-build-support
Jun 28, 2026
Merged

Add Apple Container as a build-capable runtime#509
ptone merged 2 commits into
GoogleCloudPlatform:mainfrom
ptone:scion/apple-container-build-support

Conversation

@ptone

@ptone ptone commented Jun 27, 2026

Copy link
Copy Markdown
Member

Add the container binary (Apple Virtualization framework) to DetectContainerRuntime() on macOS, alongside docker and podman.

Switch tag/push commands to use the image subcommand form (image tag, image push) which is compatible with all three runtimes. Update error messages and UI text to mention Apple Container.

Fixes #<issue_number_goes_here>

It's a good idea to open an issue first for discussion.

  • Tests pass
  • Appropriate changes to documentation are included in the PR

Add the `container` binary (Apple Virtualization framework) to
DetectContainerRuntime() on macOS, alongside docker and podman.

Switch tag/push commands to use the `image` subcommand form
(`image tag`, `image push`) which is compatible with all three
runtimes. Update error messages and UI text to mention Apple Container.
@google-cla

google-cla Bot commented Jun 27, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request adds support for the "container" runtime (Apple Container) on macOS. It updates the runtime detection logic, error messages, and UI onboarding text to include this runtime, and transitions the container CLI commands (tag, push) to use the image subcommand prefix (e.g., image tag, image push). The review feedback suggests updating the build commands to also use the image build form for consistency, and updating a dropdown label in the onboarding UI to match the "Apple Container" terminology.

<strong>No container runtime detected.</strong>
<p>
Install Docker or Podman to pull or build images. You can skip this
Install Docker, Podman, or Apple Container to pull or build images. You can skip this

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.

medium

For consistency and clarity, please also update the label for the "container" option in the dropdown menu (around line 742) from "Container (generic)" to "Apple Container" or "Apple Container (macOS)". Since the warning message now explicitly mentions "Apple Container", keeping "Container (generic)" in the dropdown can be confusing for users.

Comment thread cmd/build.go

if buildPush {
pushExec := exec.CommandContext(cmd.Context(), runtimeBin, "push", outputImage)
pushExec := exec.CommandContext(cmd.Context(), runtimeBin, "image", "push", outputImage)

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.

medium

Since the tag and push commands have been updated to use the image subcommand form (e.g., image push, image tag) for compatibility across all runtimes, the build command (on line 114) should also be updated to use the image build form (i.e., image, build) for consistency and to ensure compatibility with runtimes that require the image prefix for all image-related operations.

pushImage := registry + "/" + outputImage
_, _ = fmt.Fprintf(logger, "Tagging %s as %s...\n", outputImage, pushImage)
tagCmd := exec.CommandContext(ctx, runtimeBin, "tag", outputImage, pushImage)
tagCmd := exec.CommandContext(ctx, runtimeBin, "image", "tag", outputImage, pushImage)

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.

medium

Similar to the tag and push commands, the build command on line 556 should also be updated to use the image build form (i.e., image, build) for consistency and compatibility across all runtimes.

@ptone ptone merged commit ef3758b into GoogleCloudPlatform:main Jun 28, 2026
7 of 9 checks passed
@ptone ptone deleted the scion/apple-container-build-support branch June 28, 2026 10:43
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.

1 participant