File size: 1,065 Bytes
b75f811 8e6f2c7 7491702 6f1c61d b75f811 b4da3a3 b75f811 33d17c7 d99e77e 26723d2 d9d9fa7 2d7dc70 d9d9fa7 2d7dc70 d9d9fa7 2d7dc70 d9d9fa7 8c50bbb ba8d6ad d9d9fa7 0dcddfc 780209e 294122c 9c86f47 8c9be7d 494f224 9c4b986 e0c29b3 bfdedab b75f811 5e42ec1 032be5e 5e42ec1 353b0fb 5e42ec1 353b0fb 5e42ec1 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
# Definir la imagen
FROM debian:12.10
# Instalar Python y venv para entornos virtuales
RUN apt -y update
RUN apt install -y python3 python3-pip python3-django python3-mysqldb
#RUN python3 -m django --version [3.2.19]
# Pasos del tutorial de DJango
RUN mkdir itsz
WORKDIR itsz
#RUN django-admin startproject miSitio
# Algo para que funcionen
#RUN sed -i 's/ALLOWED_HOSTS = \[\]/ALLOWED_HOSTS = \["*"\]/g' miSitio/settings.py
# Crear app de Poll o encuestas
#RUN python3 manage.py startapp polls
COPY app ./misite
WORKDIR misite
RUN touch db.sqlite3
RUN chmod 777 db.sqlite3
RUN chmod 777 ./polls/migrations
CMD python3 manage.py makemigrations; \
python3 manage.py migrate; \
python3 manage.py createsuperuser --noinput;\
python3 manage.py runserver 0:7860; \
# Verificar si python esta instalado
# RUN which python || which python3 || which py
# Version Python
# RUN python3 --version
# Activar el entorno virutal
# RUN python3 -m venv django
# RUN python3 django/bin/activate
# Instalar DJango
# RUN python3 -m pip install Django==5.1.7
|