Docker Community Forums

Share and learn in the Docker community.

Newbie needs handholding

Hi all,
Obviously something fundamental I’m missing here. I was going through the basic training materials and bulding the first python (display cat pictures. All went ok until the actual “docker run”, where I received error messages thus:

container_linux.go:247: starting container process caused "exec: “”: executable file not found in $PATH"
docker: Error response from daemon: oci runtime error: container_linux.go:247: starting container process caused “exec: “”: executable file not found in $PATH”.

After a bit of checking and rebuilding with no joy I went back to basics, did an interactive “docker run -it alpine:3.5 /bin/sh” (alpine:3.5 being the “FROM” from Dockerfile) and looked around for python. Not installed. Now I realise I might be confused but I am !

If it’s relevant, running on Ubuntu 16.04

Anything appreciated

Kind regards

Hard to say without looking at the Dockerfile, but I’d guess you’re trying something like ENTRYPOINT [""] without having the executable anywhere in $PATH, like the message says. You probably want to update to something like ENTRYPOINT ["python", ""] or ENTRYPOINT ["/"] if it has the executable bits set for permissions and references #!/bin/python.

Hi, thanks for the reply

Famous last words, but I reran this morning to get info for the post, didn’t do anything different … and it worked.

More info below FYI:


FROM alpine:3.5

RUN apk add --update py2-pip

COPY requirements.txt /usr/src/app/
RUN pip install --no-cache-dir -r /usr/src/app/requirements.txt

COPY /usr/src/app/
COPY templates/index.html /usr/src/app/templates/


CMD [“python”, “/usr/src/app/”]

from flask import Flask, render_template
import random

app = Flask(name)

images = [”,”,”,”,”,”,”,”,”,”,”,
def index():
url = random.choice(images)
return render_template(‘index.html’, url=url)

if name == “main”:“”)


docker build -t myname/myfirstapp .

Sending build context to Docker daemon 7.68 kB
Step 1/8 : FROM alpine:3.5
—> 88e169ea8f46
Step 2/8 : RUN apk add --update py2-pip
—> Using cache
—> 7a06f9db1008
Step 3/8 : COPY requirements.txt /usr/src/app/
—> Using cache
—> 35cf99f03bbb
Step 4/8 : RUN pip install --no-cache-dir -r /usr/src/app/requirements.txt
—> Using cache
—> 52c17c28961d
Step 5/8 : COPY /usr/src/app/
—> Using cache
—> 9dc64b8702e3
Step 6/8 : COPY templates/index.html /usr/src/app/templates/
—> Using cache
—> 539c5c8908a0
Step 7/8 : EXPOSE 5000
—> Using cache
—> ff5d678c78c6
Step 8/8 : CMD python /usr/src/app/
—> Using cache
—> c07c7017b381
Successfully built c07c7017b381

Finally run

docker run -p 8888:5000 --name myfirstapp myname/myfirstapp

  • Running on (Press CTRL+C to quit) - - [22/Feb/2017 09:40:17] “GET / HTTP/1.1” 200 - - - [22/Feb/2017 09:40:22] “GET /favicon.ico HTTP/1.1” 404 - - - [22/Feb/2017 09:40:45] “GET / HTTP/1.1” 200 -