MCPcopy Index your code
hub / github.com/cortexlabs/cortex / ErrorDockerPermissions

Function ErrorDockerPermissions

pkg/lib/docker/errors.go:47–59  ·  view source on GitHub ↗
(err error)

Source from the content-addressed store, hash-verified

45}
46
47func ErrorDockerPermissions(err error) error {
48 errStr := errors.Message(err)
49
50 var groupAddStr string
51 if strings.HasPrefix(runtime.GOOS, "linux") {
52 groupAddStr = " (e.g. by running `sudo groupadd docker; sudo gpasswd -a $USER docker` and then restarting your terminal)"
53 }
54
55 return errors.WithStack(&errors.Error{
56 Kind: ErrDockerPermissions,
57 Message: errStr + "\n\nyou can re-run this command with `sudo`, or grant your current user access to docker" + groupAddStr,
58 })
59}
60
61func ErrorImageDoesntExistLocally(image string) error {
62 return errors.WithStack(&errors.Error{

Callers 1

WrapDockerErrorFunction · 0.85

Calls 2

MessageFunction · 0.92
WithStackFunction · 0.92

Tested by

no test coverage detected