You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

28 lines
632 B

FROM python:3.11.4-slim-buster
# Añadir usuario
RUN addgroup --system app && adduser --system --group app
# Add application sources with correct permissions for OpenShift
ENV APP_HOME=/app
RUN mkdir -p $APP_HOME/datos
ADD . $APP_HOME
USER 0
# Install the dependencies
RUN apt-get update && apt-get install -y sqlite3
RUN pip install -U "pip>=19.3.1" && \
pip install -r $APP_HOME/requirements.txt && \
# python manage.py collectstatic --noinput && \
python $APP_HOME/manage.py migrate
WORKDIR $APP_HOME
RUN chown -R app:0 ./
USER app
EXPOSE 8080
# Run the application
CMD python manage.py runserver 0.0.0.0:8080