# Executable file not found in $PATH (Alpine Linux)

**URL:** <https://forums.docker.com/t/executable-file-not-found-in-path-alpine-linux/137231>\
**Category:** General\
**Tags:** docker\
**Created:** [August 12, 2023, 10:41pm UTC](https://forums.docker.com/t/executable-file-not-found-in-path-alpine-linux/137231 "2023-08-12T22:41:24Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![walteroa](https://avatars.discourse-cdn.com/v4/letter/w/b5a626/32.png) [@walteroa](https://forums.docker.com/u/walteroa)\
**Post date:** [August 12, 2023, 10:41pm UTC](https://forums.docker.com/t/executable-file-not-found-in-path-alpine-linux/137231/1 "2023-08-12T22:41:24Z")

</div>

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?

//command:  
**sudo docker exec -it 90747a12f96a ls**

answer:  
**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 🙂 🥺 🙏

---

<div class="post-metadata">

**Author:** ![terpz](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/terpz/32/36125_2.png) [@terpz](https://forums.docker.com/u/terpz)\
**Post date:** [August 12, 2023, 11:28pm UTC](https://forums.docker.com/t/executable-file-not-found-in-path-alpine-linux/137231/2 "2023-08-12T23:28:57Z")

</div>

Hi 🙂

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 ?

---

<div class="post-metadata">

**Author:** ![walteroa](https://avatars.discourse-cdn.com/v4/letter/w/b5a626/32.png) [@walteroa](https://forums.docker.com/u/walteroa)\
**Post date:** [August 13, 2023, 10:17am UTC](https://forums.docker.com/t/executable-file-not-found-in-path-alpine-linux/137231/3 "2023-08-13T10:17:40Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![rimelek](https://sea3.discourse-cdn.com/docker/user_avatar/forums.docker.com/rimelek/32/41602_2.png) [@rimelek](https://forums.docker.com/u/rimelek)\
**Post date:** [August 13, 2023, 12:54pm UTC](https://forums.docker.com/t/executable-file-not-found-in-path-alpine-linux/137231/4 "2023-08-13T12:54:38Z")

</div>

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

[https://github.com/portainer/docker-images/blob/7859d9c0216f86bd7692efdc5cf675fa120fe3fa/base/Dockerfile#L5](https://github.com/portainer/docker-images/blob/7859d9c0216f86bd7692efdc5cf675fa120fe3fa/base/Dockerfile#L5)

[https://github.com/portainer/portainer/blob/0eaf296e1b31bfca2e0a969a81aa62accd50ab90/build/linux/Dockerfile#L1C6-L1C20](https://github.com/portainer/portainer/blob/0eaf296e1b31bfca2e0a969a81aa62accd50ab90/build/linux/Dockerfile#L1C6-L1C20)

---

<div class="post-metadata">

**Author:** ![walteroa](https://avatars.discourse-cdn.com/v4/letter/w/b5a626/32.png) [@walteroa](https://forums.docker.com/u/walteroa)\
**Post date:** [August 13, 2023, 3:15pm UTC](https://forums.docker.com/t/executable-file-not-found-in-path-alpine-linux/137231/5 "2023-08-13T15:15:22Z")

</div>

Absolutely crystal clear. Thx a los for the help. 🙂
