mirror of
https://github.com/apple/container.git
synced 2026-09-23 08:05:38 +00:00
## Type of Change - [ ] Bug fix - [ ] New feature - [ ] Breaking change - [ ] Documentation update ## Motivation and Context Fixes #1049 - Add --runtime option for Flags.Management - Apply runtime handler in containerConfigFromFlags - Update command-reference.md doc ## Testing - [x] Tested locally - [ ] Added/updated tests - [ ] Added/updated docs Co-authored-by: J Logan <john_logan@apple.com>
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
@@ -65,6 +65,7 @@ container run [<options>] <image> [<arguments> ...]
|
||||
* `--tmpfs <tmpfs>`: Add a tmpfs mount to the container at the given path
|
||||
* `-v, --volume <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 [<options>] <image> [<arguments> ...]
|
||||
* `--tmpfs <tmpfs>`: Add a tmpfs mount to the container at the given path
|
||||
* `-v, --volume <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**
|
||||
|
||||
|
||||
Reference in New Issue
Block a user