containers / containers/toolbox

improve error message when `passwd` not part of container image

Open
#181 2 comments 0 reactions 0 assignees View on GitHub
1. Bug 4. Invalid 5. Help Wanted
Dominant language
Go
Stars
3.5k
Forks
262
Avg merge
3d 1h
Merged PRs (30d)
1

Description

When a user specifies a different container image to use (via `--image`), it may not include the `passwd` utility which is required for `toolbox` operation. In this scenario, the error message looks like this:

```
...
toolbox: trying to create working container toolbox-working-container-698c302c-821d-11e9-90b1-d2844349e413
toolbox: trying to configure working container toolbox-working-container-698c302c-821d-11e9-90b1-d2844349e413
error running container: error creating container for [passwd -d miabbott]: container_linux.go:345: starting container process caused "exec: \"passwd\": executable file not found in $PATH"
: exit status 1
error while running runtime: exit status 1
ERRO[0000] exit status 1
toolbox: failed to remove password for user miabbott
```

This isn't very intuitive to the end user about what is the nature of the problem.

`toolbox` should be able to test the container image for required dependencies before attempting to create a container to work within, then error out with a clearer message.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.