Error running docker container: starting container process caused "exec: \"python\": executable file not found in $PATH": unknown Error running docker container: starting container process caused "exec: \"python\": executable file not found in $PATH": unknown flask flask

Error running docker container: starting container process caused "exec: \"python\": executable file not found in $PATH": unknown


There is no /usr/bin/python in a docker image built by the code above. But there is /usr/bin/python3. So you could either use python3 directly as your ENTRYPOINT or create a symlink.


I was getting the same issue except that it was yelling some other number than 344

docker: Error response from daemon: OCI runtime create failed: container_linux.go:344: starting container process caused "exec: \"python\": executable file not found in $PATH": unknown. and the docker file was

FROM ubuntu:20.04RUN apt-get update -yRUN apt-get install -y python3RUN apt-get install -y python3-pipCOPY ./requirements.txt /app/requirements.txtWORKDIR /appRUN pip3 install -r requirements.txtCOPY . /appENTRYPOINT [ "python" ]CMD [ "app.py" ]

I changed the lineENTRYPOINT [ "python" ] to ENTRYPOINT [ "python3" ] Now it is working fine.The reason for this was that above I had used Python3 so there was no candidate for Python rather there were for Python3.

RUN apt-get install -y python3RUN apt-get install -y python3-pip