Skip to content

Support apple/container container runtime #855

@Lev1ty

Description

@Lev1ty

While on v2.2.6, I tried patch rules_oci to use container CLI (from https://github.com/apple/container) to load a tarball.

--- oci/private/load.sh.tpl
+++ oci/private/load.sh.tpl
@@ -16,2 +16,4 @@
-elif command -v podman &> /dev/null; then
-    CONTAINER_CLI="podman"
+elif command -v podman &> /dev/null; then
+    CONTAINER_CLI="podman"
+elif command -v container &> /dev/null; then
+    CONTAINER_CLI="container"
@@ -31,1 +31,1 @@
-"$CONTAINER_CLI" load --input <(
+"$CONTAINER_CLI" image load --input <(

The output path for oci_load target was bazel-bin/helloworld/bin/app_load.sh.
Running bazel run //helloworld/bin:app_load yielded an error:

Error: unknown: "Error Domain=NSCocoaErrorDomain Code=512 "The file “63” couldn’t be saved in the folder “fd”." UserInfo={NSFilePath=/dev/fd/63, NSUnderlyingError=0xa4c4101b0 {Error Domain=NSPOSIXErrorDomain Code=9 "Bad file descriptor"}}"
tar: Write error

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions