dagger/dagger · error
no such user: %s
Error message
no such user: %s
What it means
findUID parsed /etc/passwd successfully but no entry matches the requested user name. The container image has no such user; the user specified for the container or file ownership does not exist in the image.
Source
Thrown at core/util.go:58
}
if workDir == "" {
workDir = "/"
}
return path.Join(workDir, containerPath)
}
func findUID(f io.Reader, uname string) (int, error) {
users, err := user.ParsePasswdFilter(f, func(u user.User) bool {
return u.Name == uname
})
if err != nil {
return -1, fmt.Errorf("parse /etc/passwd: %w", err)
}
if len(users) == 0 {
return -1, fmt.Errorf("no such user: %s", uname)
}
return users[0].Uid, nil
}
func findGID(f io.Reader, gname string) (int, error) {
groups, err := user.ParseGroupFilter(f, func(g user.Group) bool {
return g.Name == gname
})
if err != nil {
return -1, fmt.Errorf("parse /etc/group: %w", err)
}
if len(groups) == 0 {
return -1, fmt.Errorf("no such group: %s", gname)
}
return groups[0].Gid, nilView on GitHub (pinned to 82ba2681db)
Solutions
- Use a user that exists in the image (check with `getent passwd` in the image)
- Reference the user by numeric UID instead of name
- Add the user to the image before running
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at core/util.go:58 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of dagger/dagger@82ba2681db (2026-09-05).
Data as JSON: /api/errors/65b67b86608eb59d.
Report an issue: GitHub.