my docker-compose file as below:
Django_2.2:
build:
context: .
dockerfile: Dockerfile_Build_Django
# Give an image name/tag
image: django_2.2:iot
container_name: Django_2.2
depends_on:
- Django_Mongo_4.2.12
networks:
sw_Django:
ipv4_address: 192.168.110.12
ports:
- 8000:80
restart: always
volumes:
- type: volume
source: vol_django_codes
target: /usr/src/app
My docker file "Dockerfile_Build_Django" as below:
FROM python:3.9.3-alpine3.13
ENV PYTHONUNBUFFERED 1
RUN mkdir /code
WORKDIR /code
COPY . .
RUN pip install -r requirements.txt
# CMD ["python","./IoTSite/manage.py","runserver","0.0.0.0:80"]
CMD python ./IoTSite/manage.py runserver 0.0.0.0:80
requirements.txt as below: only 1 line
Django == 2.2.17
but when I run "docker-compose up", it failed with below errors,
[root@Django]# docker logs Django_2.2
/bin/sh: [python3,: not found
/bin/sh: [python3,: not found
/bin/sh: [python3,: not found
/bin/sh: [python3,: not found
/bin/sh: [python3,: not found
/bin/sh: [python3,: not found
/bin/sh: [python3,: not found
/bin/sh: [python3,: not found
I have been searching for solution for a long time and tried many fixes found via google, no luck so far. any help is appreciated. I feel like getting involved in IT is a waste of life because coding according to guide/user manual for 5 mins then troubleshooting for hours or even days...