Maybe a faster, more dependeable dockerfile?
This commit is contained in:
parent
d0f30c4f9c
commit
044b82cb25
17
Dockerfile
17
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
|
WORKDIR /app
|
||||||
COPY Pipfile Pipfile.lock /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 \
|
RUN set -xe \
|
||||||
&& pipenv install --dev \
|
|
||||||
&& apt-get remove -y gcc python3-dev libssl-dev \
|
&& apt-get remove -y gcc python3-dev libssl-dev \
|
||||||
&& apt-get autoremove -y \
|
&& apt-get autoremove -y \
|
||||||
&& apt-get clean -y \
|
&& apt-get clean -y \
|
||||||
&& rm -rf /var/lib/apt/lists/* \
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
&& useradd _gunicorn --no-create-home --user-group
|
|
||||||
|
|
||||||
COPY . /app/
|
COPY . /app/
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
Loading…
Reference in New Issue