diff --git a/Sources/Services/ContainerAPIService/Client/Flags.swift b/Sources/Services/ContainerAPIService/Client/Flags.swift index e64ce927..86616a03 100644 --- a/Sources/Services/ContainerAPIService/Client/Flags.swift +++ b/Sources/Services/ContainerAPIService/Client/Flags.swift @@ -221,6 +221,9 @@ public struct Flags { @Flag(name: .long, help: "Mount the container's root filesystem as read-only") public var readOnly = false + + @Option(name: .long, help: "Set the runtime handler for the container (default: container-runtime-linux)") + public var runtime: String? } public struct Progress: ParsableArguments { diff --git a/Sources/Services/ContainerAPIService/Client/Utility.swift b/Sources/Services/ContainerAPIService/Client/Utility.swift index 22fcb8fb..a57383aa 100644 --- a/Sources/Services/ContainerAPIService/Client/Utility.swift +++ b/Sources/Services/ContainerAPIService/Client/Utility.swift @@ -248,6 +248,10 @@ public struct Utility { config.ssh = management.ssh config.readOnly = management.readOnly + if let runtime = management.runtime { + config.runtimeHandler = runtime + } + return (config, kernel) } diff --git a/docs/command-reference.md b/docs/command-reference.md index e799fa28..507971a3 100644 --- a/docs/command-reference.md +++ b/docs/command-reference.md @@ -65,6 +65,7 @@ container run [] [ ...] * `--tmpfs `: Add a tmpfs mount to the container at the given path * `-v, --volume `: Bind mount a volume into the container * `--virtualization`: Expose virtualization capabilities to the container (requires host and guest support) +* `--runtime`: Set the runtime handler for the container (default: container-runtime-linux) **Registry Options** @@ -214,6 +215,7 @@ container create [] [ ...] * `--tmpfs `: Add a tmpfs mount to the container at the given path * `-v, --volume `: Bind mount a volume into the container * `--virtualization`: Expose virtualization capabilities to the container (requires host and guest support) +* `--runtime`: Set the runtime handler for the container (default: container-runtime-linux) **Registry Options**