Diferència entre revisions de la pàgina «Grup4 - 21. classVRroom. Dockerització del projecte Django.»
Salta a la navegació
Salta a la cerca
(Es crea la pàgina amb «'''Dockerfile''' # We Use an official Python runtime as a parent image FROM python:3.8-slim # install db libs RUN apt-get update RUN apt-get install -y default-...».) |
|||
Línia 1: | Línia 1: | ||
'''Dockerfile''' | '''Dockerfile''' | ||
+ | ---- | ||
# We Use an official Python runtime as a parent image | # We Use an official Python runtime as a parent image | ||
FROM python:3.8-slim | FROM python:3.8-slim |
Revisió del 15:58, 28 març 2022
Dockerfile
# We Use an official Python runtime as a parent image FROM python:3.8-slim # install db libs RUN apt-get update RUN apt-get install -y default-mysql-client libmariadb-dev RUN apt-get install -y libmariadb-dev-compat gcc gdal-bin libjpeg-dev # install app libs COPY requirements.txt requirements.txt RUN pip3 install --no-cache-dir -r requirements.txt #copy directory principal COPY lms /lms # establish workdir WORKDIR /lms EXPOSE 8000 # runs the initvroom ENTRYPOINT ["python3","manage.py"] CMD ["initvroom.py"] # runs the development server ENTRYPOINT ["python3","manage.py"] CMD ["runserver","0.0.0.0:8000"]