Skip to content

Commit

Permalink
add note to re-consider root warning for containers
Browse files Browse the repository at this point in the history
  • Loading branch information
magiconair committed Feb 2, 2018
1 parent 94973bd commit d2b173f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions rootwarn_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ const warn17behavior = `
var once sync.Once

func WarnIfRunAsRoot(allowRoot bool) {
// todo(fs): should we emit the same warning when running inside a container?
// todo(fs): check for existence of `/.dockerenv` to determine Docker environment.
isRoot := os.Getuid() == 0
if !isRoot {
return
Expand Down

0 comments on commit d2b173f

Please sign in to comment.