Skip to content

Commit 14606eb

Browse files
authored
Merge pull request #43 from AkihiroSuda/rootless
add support for --rootless
2 parents 74719bd + 0194529 commit 14606eb

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

runc.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ type Runc struct {
6666
Setpgid bool
6767
Criu string
6868
SystemdCgroup bool
69+
Rootless *bool // nil stands for "auto"
6970
}
7071

7172
// List returns all containers created inside the provided runc root directory
@@ -655,6 +656,10 @@ func (r *Runc) args() (out []string) {
655656
if r.SystemdCgroup {
656657
out = append(out, "--systemd-cgroup")
657658
}
659+
if r.Rootless != nil {
660+
// nil stands for "auto" (differs from explicit "false")
661+
out = append(out, "--rootless="+strconv.FormatBool(*r.Rootless))
662+
}
658663
return out
659664
}
660665

0 commit comments

Comments
 (0)