establish 20220209-Django_images, Put it in Django_PP and dockerfile.
Django_PP Next new package. Start this machine django Copy all items to package below .
FROM python:3.8
COPY ./Django_PP /code
WORKDIR /code/package
# Installation dependency
RUN pip install -r requirements.txt
# to grant authorization
RUN chmod 777 /code/package/runserver.sh
# Exposed port
EXPOSE 8000
# sh yes linux Command line
CMD ["/bin/sh","/code/package/runserver.sh"]
Use pip freeze Get the installed Python package
https://blog.csdn.net/sigmarising/article/details/85235062
docker build -t pp4 .
docker run -it -p 8000:8000 --name pp_container4 pp4
Input docker ps See what's running container.