I have a very simple python script. I am trying to get it to run from within docker. I have simplified it so it just prints hello world now.
My docker set up:
[docker-compose.yaml]
version: '2'
services:
dev:
build: .
volumes:
- ./app.py:/app.py
[Dockerfile]
FROM ubuntu
RUN apt-get update -y
RUN apt-get install -y python python-pip python-dev build-essential libpq-dev
ADD ./requirements /code/requirements
RUN pip install --upgrade pip
RUN pip install -r /code/requirements/base.txt
VOLUME /app.py
CMD ["python","/app.py"]
When I run docker-compose up I get the following error:
ERROR: for dev Cannot start service dev: oci runtime error: exec: "Python": executable file not found in $PATH
However, docker should be built into the Ubuntu Image. It is the same image I use for my Python Flask script but that works no issue.