diff --git a/cmd/buildkitd/main.go b/cmd/buildkitd/main.go index 9835f3088..8bafcfdfd 100644 --- a/cmd/buildkitd/main.go +++ b/cmd/buildkitd/main.go @@ -135,6 +135,9 @@ func main() { app.Flags = append(app.Flags, appFlags...) app.Action = func(c *cli.Context) error { + if os.Geteuid() != 0 { + return errors.New("rootless mode requires to be executed as the mapped root in a user namespace; you may use RootlessKit for setting up the namespace") + } ctx, cancel := context.WithCancel(appcontext.Context()) defer cancel()