From 489ae2efaf543be3f0ed179199d074fc60939fd6 Mon Sep 17 00:00:00 2001 From: Bobby Date: Sun, 11 Aug 2024 22:14:43 -0400 Subject: some dockerfile updates --- Dockerfile | 25 +++++-------------------- entrypoint.sh | 11 ++++------- 2 files changed, 9 insertions(+), 27 deletions(-) diff --git a/Dockerfile b/Dockerfile index 57b4adcc..7e9bcbf4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,31 +1,16 @@ -ARG PYTHON_VERSION=3.11-slim-bullseye +FROM ubuntu:20.04 -FROM python:${PYTHON_VERSION} AS base - -RUN apt-get update \ - # dependencies for building Python packages - && apt-get install -y build-essential \ - # psycopg2 dependencies - && apt-get install -y libpq-dev \ - # Translations dependencies - && apt-get install -y gettext \ - && apt-get install -y libcairo2 libpango-1.0-0 libpangocairo-1.0-0 libgdk-pixbuf2.0-0 libffi-dev shared-mime-info \ - # cleaning up unused files - && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \ - && rm -rf /var/lib/apt/lists/* - -ENV PYTHONDONTWRITEBYTEshifoo 1 -ENV PYTHONUNBUFFERED 1 +RUN apt-get update && apt-get install -y python3 python3-pip python3-dev libffi-dev libssl-dev python3-venv RUN mkdir -p /shifoo WORKDIR /shifoo -COPY requirements.txt /shifoo/ +COPY . /shifoo -RUN pip install -r requirements.txt +RUN pip3 install -r requirements.txt --break-system-packages -COPY . /shifoo/ +RUN chmod +x entrypoint.sh EXPOSE 8000 diff --git a/entrypoint.sh b/entrypoint.sh index c7263321..83bcda28 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -1,7 +1,4 @@ -python manage.py collectstatic --noinput - -python manage.py makemigrations - -python manage.py migrate - -python manage.py runserver \ No newline at end of file +python3 manage.py collectstatic --noinput +python3 manage.py makemigrations +python3 manage.py migrate +python3 manage.py runserver -- cgit v1.2.3