Executable file not found in $PATH (Alpine Linux)

Hi guys, sorry to bother u.
I’ve got this error when running docker exec, and unfortunately No idea how to fix it…

any good guy to help me?

sudo docker exec -it 90747a12f96a ls

OCI runtime exec failed: exec failed: unable to start container process: exec: “ls”: executable file not found in $PATH: unknown

I’ve tried with several commands, it not a matter of ls or accessing thru sh or ash or bash…

help me please :slight_smile: :pleading_face: :pray:

Hi :slight_smile:

The image you’re using is either hiding the commands, or not included.
Instead of trying to use “ls” directly, you can try the full path, like /usr/bin/ls, /bin/ls or /bin/sh

which image are you using ?

1 Like

I’m using portainer-ce:latest

And you are all right !!! when tried with other image, works perfect (louislam/uptime-kuma:1)…

So, how can I fix it for the portainer image from outside container, if can’t access thru terminal?

There is nothing to fix. There is just nothing in the container except portainer.



1 Like

Absolutely crystal clear. Thx a los for the help. :slightly_smiling_face: