Reputation: 93
I was successfully able to run my container (Django Python) on an older version of the docker engine. I did not change any code, yet now I see this error.
$ docker run --net container_net --ip 172.18.0.2 sift_pro
python: can't open file './manage.py runserver 0.0.0.0:8001': [Errno 2] No such file or directory
Here is what my dockerfile looks like:
FROM python:3.8
ENV PYTHONUNBUFFERED 1
RUN pip install
...
...
...
COPY . .
CMD ["python", "./manage.py runserver 0.0.0.0:8001"]
I have also tried other variations of this code with no success.
FROM python:3.8
WORKDIR c:\\windows\\sift
ENV PYTHONUNBUFFERED 1
COPY . .
CMD ["python", "C:\\windows\\sift\\manage.py runserver 0.0.0.0:8001"]
Does anyone see what I am doing wrong?
Upvotes: 0
Views: 372
Reputation: 93
I solved it with this:
CMD [ "python", "manage.py", "runserver", "0.0.0.0:8000" ]
Upvotes: 1