aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBobby <[email protected]>2024-08-11 22:14:43 -0400
committerBobby <[email protected]>2024-08-11 22:14:43 -0400
commit489ae2efaf543be3f0ed179199d074fc60939fd6 (patch)
tree5b9f345830996738ae77bfc720e836701603d17f
parent0aef88c113eda702bb268d6943ca8325d59daa3e (diff)
downloadthatcomputerscientist-489ae2efaf543be3f0ed179199d074fc60939fd6.tar.xz
thatcomputerscientist-489ae2efaf543be3f0ed179199d074fc60939fd6.zip
some dockerfile updates
-rw-r--r--Dockerfile25
-rw-r--r--entrypoint.sh11
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