diff --git a/cmd/containerd/command/main.go b/cmd/containerd/command/main.go index c26c645d9..e40c2f35b 100644 --- a/cmd/containerd/command/main.go +++ b/cmd/containerd/command/main.go @@ -321,6 +321,13 @@ func applyFlags(context *cli.Context, config *srvconfig.Config) error { } { if s := context.GlobalString(v.name); s != "" { *v.d = s + if v.name == "root" || v.name == "state" { + absPath, err := filepath.Abs(s) + if err != nil { + return err + } + *v.d = absPath + } } }