When create/start a container with image that Config.Env=null, hyperd won't give a default PATH env, so that cmd like sh will return a No such file or directory error.
Actually this is not a bug of hyper, while docker has done this when start container. Some of the k8s test relay on this 'feature' (image don't specific Env and they use sh as cmd...)
FYI:
docker inspect busybox:latest
...
"Config": {
"Hostname": "55cd1f8f6e5b",
"Domainname": "",
"User": "",
"AttachStdin": false,
"AttachStdout": false,
"AttachStderr": false,
"Tty": false,
"OpenStdin": false,
"StdinOnce": false,
"Env": [
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
],
"Cmd": [
"sh"
],
"Image": "sha256:e732471cb81a564575aad46b9510161c5945deaf18e9be3db344333d72f0b4b2",
"Volumes": null,
"WorkingDir": "",
"Entrypoint": null,
"OnBuild": null,
"Labels": {}
},
...
docker inspect gcr.io/google_containers/busybox:1.24
...
"Config": {
"Hostname": "aded96b43f48",
"Domainname": "",
"User": "",
"AttachStdin": false,
"AttachStdout": false,
"AttachStderr": false,
"Tty": false,
"OpenStdin": false,
"StdinOnce": false,
"Env": null,
"Cmd": [
"sh"
],
"Image": "9e77fef7a1c9f989988c06620dabc4020c607885b959a2cbd7c2283c91da3e33",
"Volumes": null,
"WorkingDir": "",
"Entrypoint": null,
"OnBuild": null,
"Labels": null
},
...
/cc @resouer @feiskyer @gnawux