Skip to content

Commit

Permalink
Merge pull request #43 from AkihiroSuda/rootless
Browse files Browse the repository at this point in the history
add support for --rootless
  • Loading branch information
mlaventure committed Jul 3, 2018
2 parents 74719bd + 0194529 commit 14606eb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions runc.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ type Runc struct {
Setpgid bool
Criu string
SystemdCgroup bool
Rootless *bool // nil stands for "auto"
}

// List returns all containers created inside the provided runc root directory
Expand Down Expand Up @@ -655,6 +656,10 @@ func (r *Runc) args() (out []string) {
if r.SystemdCgroup {
out = append(out, "--systemd-cgroup")
}
if r.Rootless != nil {
// nil stands for "auto" (differs from explicit "false")
out = append(out, "--rootless="+strconv.FormatBool(*r.Rootless))
}
return out
}

Expand Down

0 comments on commit 14606eb

Please sign in to comment.