From 044b82cb25ff751762dc24111f953370fe7fe46a Mon Sep 17 00:00:00 2001 From: Dan Date: Thu, 11 Feb 2021 12:44:34 -0500 Subject: [PATCH] Maybe a faster, more dependeable dockerfile? --- Dockerfile | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index bc602d09..ef931d08 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,15 +1,24 @@ -FROM sartography/cr-connect-python-base +FROM python:3.8 + +RUN pip install pipenv +RUN useradd _gunicorn --no-create-home --user-group + +RUN apt-get update && \ + apt-get install -y -q \ + gcc libssl-dev \ + curl postgresql-client git-core \ + gunicorn3 postgresql-client WORKDIR /app COPY Pipfile Pipfile.lock /app/ +RUN cd /app && pipenv lock --keep-outdated --requirements > requirements.txt +RUN pip install -r /app/requirements.txt RUN set -xe \ - && pipenv install --dev \ && apt-get remove -y gcc python3-dev libssl-dev \ && apt-get autoremove -y \ && apt-get clean -y \ - && rm -rf /var/lib/apt/lists/* \ - && useradd _gunicorn --no-create-home --user-group + && rm -rf /var/lib/apt/lists/* COPY . /app/ WORKDIR /app