summaryrefslogtreecommitdiff
path: root/vendor/github.com/opencontainers/runtime-tools/generate
diff options
context:
space:
mode:
authorValentin Rothberg <rothberg@redhat.com>2019-01-08 14:52:57 +0100
committerValentin Rothberg <rothberg@redhat.com>2019-01-11 13:38:11 +0100
commitbd40dcfc2bc7c9014ea1f33482fb63aacbcdfe87 (patch)
tree5f06e4e289f16d9164d692590a3fe6541b5384cf /vendor/github.com/opencontainers/runtime-tools/generate
parent545f24421247c9f6251a634764db3f8f8070a812 (diff)
downloadpodman-bd40dcfc2bc7c9014ea1f33482fb63aacbcdfe87.tar.gz
podman-bd40dcfc2bc7c9014ea1f33482fb63aacbcdfe87.tar.bz2
podman-bd40dcfc2bc7c9014ea1f33482fb63aacbcdfe87.zip
vendor: update everything
* If possible, update each dependency to the latest available version. * Use releases over commit IDs and avoid vendoring branches. Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
Diffstat (limited to 'vendor/github.com/opencontainers/runtime-tools/generate')
-rw-r--r--vendor/github.com/opencontainers/runtime-tools/generate/generate.go34
1 files changed, 27 insertions, 7 deletions
diff --git a/vendor/github.com/opencontainers/runtime-tools/generate/generate.go b/vendor/github.com/opencontainers/runtime-tools/generate/generate.go
index 955a9d5f9..1eb44770f 100644
--- a/vendor/github.com/opencontainers/runtime-tools/generate/generate.go
+++ b/vendor/github.com/opencontainers/runtime-tools/generate/generate.go
@@ -39,23 +39,43 @@ type ExportOptions struct {
// New creates a configuration Generator with the default
// configuration for the target operating system.
func New(os string) (generator Generator, err error) {
- if os != "linux" && os != "solaris" {
+ if os != "linux" && os != "solaris" && os != "windows" {
return generator, fmt.Errorf("no defaults configured for %s", os)
}
config := rspec.Spec{
- Version: rspec.Version,
- Root: &rspec.Root{
+ Version: rspec.Version,
+ Hostname: "mrsdalloway",
+ }
+
+ if os == "windows" {
+ config.Process = &rspec.Process{
+ Args: []string{
+ "cmd",
+ },
+ Cwd: `C:\`,
+ ConsoleSize: &rspec.Box{
+ Width: 80,
+ Height: 20,
+ },
+ }
+ config.Windows = &rspec.Windows{
+ IgnoreFlushesDuringBoot: true,
+ Network: &rspec.WindowsNetwork{
+ AllowUnqualifiedDNSQuery: true,
+ },
+ }
+ } else {
+ config.Root = &rspec.Root{
Path: "rootfs",
Readonly: false,
- },
- Process: &rspec.Process{
+ }
+ config.Process = &rspec.Process{
Terminal: false,
Args: []string{
"sh",
},
- },
- Hostname: "mrsdalloway",
+ }
}
if os == "linux" || os == "solaris" {