Error response from daemon: oci runtime error: container_linux.go: 262:

I just started using docker. I am very new to level.i to set an alpine image to test docker workflow, but after launch

docker run alpine ls -l

I get the following error

Error response from daemon: oci runtime error: container_linux.go:262: starting container process caused "exec: \"ls-l\": executable file not found in $PATH".

I installed docker for windows on Windows 10. I searched on the net but could not find a suitable solution. Help me figure it out

thank

+4
source share
1 answer

The exact same thing works for me, although my host launches Ubuntu. I saw this error when the command you pass to the container is invalid, which happens several times in Alpine when people try to call bash since bash does not send with the base Alpine:

 $ docker run alpine bash
 container_linux.go:262: starting container process caused "exec: \"bash\": executable file not found in $PATH"
 docker: Error response from daemon: oci runtime error: container_linux.go:262: starting container process caused "exec: \"bash\": executable file not found in $PATH".

, sh . :

 $ docker run alpine sh -c 'ls -l'
total 52
drwxr-xr-x    2 root     root          4096 Oct 25 22:05 bin
drwxr-xr-x    5 root     root           340 Nov 15 22:45 dev
drwxr-xr-x   14 root     root          4096 Nov 15 22:45 etc
drwxr-xr-x    2 root     root          4096 Oct 25 22:05 home
...

, .

+1

Source: https://habr.com/ru/post/1682097/


All Articles