36 lines
1,004 B
Plaintext
36 lines
1,004 B
Plaintext
FROM debian:stable-slim
|
|
|
|
CMD [ "bash" ]
|
|
|
|
# Variables de entorno
|
|
ENV DB_User="admin"
|
|
ENV DB_Email="ad@ad.ad"
|
|
ENV DB_Pass="admin"
|
|
|
|
# Instalar paquetes necesarios
|
|
RUN apt-get update
|
|
RUN apt-get install --no-install-recommends -y git python3-pip python3-setuptools python3-venv python3
|
|
|
|
# Creamos un usuario (django-orchestra no se ejecutará si somos root)
|
|
RUN useradd -ms /bin/bash -d /home/Ouser Ouser
|
|
USER Ouser
|
|
WORKDIR /home/Ouser/django
|
|
|
|
# Creamos el entorno de desarollo
|
|
ENV VENV_FOLDER=/home/Ouser/.venv
|
|
RUN python3 -m venv ${VENV_FOLDER}
|
|
RUN chmod +x ${VENV_FOLDER}/bin/activate
|
|
RUN . ${VENV_FOLDER}/bin/activate
|
|
|
|
# Instalamos django-admin y sus dependencias
|
|
RUN pip install wheel
|
|
COPY . .
|
|
RUN ${VENV_FOLDER}/bin/pip install -r requirements.txt
|
|
RUN ${VENV_FOLDER}/bin/pip install -e .
|
|
|
|
# Creamos el panel
|
|
# RUN [ "/bin/bash", "./.docker/setup.sh" ]
|
|
|
|
# Establacamos el punto de entrada de el contenedor de docker
|
|
ENTRYPOINT ["sh", "-c", "tail -f /dev/null"]
|
|
# ENTRYPOINT [ "./.docker/entrypoint.sh" ] |