mirror of
https://github.com/moby/buildkit.git
synced 2026-08-08 08:40:45 +00:00
rootless: bail if euid != 0
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
This commit is contained in:
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user