'Cannot execute a shell in docker
When trying to execute a shell (to modify html files in a docker container, i get the error
OCI runtime exec failed: exec failed: container_linux.go:380: starting container process caused: exec: "/bin/sh": stat /bin/sh: no such file or directory: unknown this basically is the same with sh, /bin/bash or bash. Does anyone know how to fix this? I'd guess it would be good to mention I'm using this image. Sorry if some containers dont have a shell or something, I'm a newbie at this. I am aware I could mount it locally, but due to me not knowing the location of the files, I'd guess that isn't an option.
Thanks for any help or ideas! :)
Solution 1:[1]
This image is based on scratch which is literally an empty zero byte image so you're right, it doesn't have a shell.
Try using alpine or something with bash instead.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Kamil Gwó?d? |
