Skip to content

executable file not found in $PATH #3597

@Ecsy

Description

@Ecsy

Description

executable file not found in $PATH error message is displayed although the executable is in path. Only containerd 1.2.8 version is affected.

Steps to reproduce the issue:

$ ctr content fetch docker.io/bitnami/minideb:latest
$ ctr run --rm docker.io/bitnami/minideb:latest minideb sh -c 'echo ok'
ctr: OCI runtime create failed: container_linux.go:345: starting container process caused "exec: \"sh\": executable file not found in $PATH": unknown

Describe the results you received:

$ ctr run --rm docker.io/bitnami/minideb:latest minideb /bin/sh -c 'which sh'
/bin/sh
$ ctr run --rm docker.io/bitnami/minideb:latest minideb /bin/sh -c 'echo $PATH'
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

Describe the results you expected:
Expected to get the same result as with alpine:

$ ctr content fetch docker.io/library/alpine:latest
$ ctr run --rm docker.io/library/alpine:latest alpine sh -c 'echo ok'
ok
$ ctr run --rm docker.io/library/alpine:latest alpine sh -c 'which sh'
/bin/sh
$ ctr run --rm docker.io/library/alpine:latest alpine sh -c 'echo $PATH'
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

Output of containerd --version:

containerd github.com/containerd/containerd v1.2.8 a4bc1d432a2c33aa2eed37f338dceabb93641310

Any other relevant information:
Only v1.2.8 is affected.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions