Hi all,
Obviously something fundamental I’m missing here. I was going through the basic training materials and bulding the first python flask.app (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: "app.py": executable file not found in $PATH”
docker: Error response from daemon: oci runtime error: container_linux.go:247: starting container process caused “exec: "app.py": 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 !
Hard to say without looking at the Dockerfile, but I’d guess you’re trying something like ENTRYPOINT ["app.py"] without having the executable anywhere in $PATH, like the message says. You probably want to update to something like ENTRYPOINT ["python", "app.py"] or ENTRYPOINT ["/app.py"] if it has the executable bits set for permissions and references #!/bin/python.