2020-10-26 17:00:02 +00:00
|
|
|
FROM python:3.9-slim-buster
|
|
|
|
# https://hub.docker.com/_/python
|
|
|
|
|
2020-11-14 19:12:39 +00:00
|
|
|
ARG XDG_CACHE_HOME
|
|
|
|
ENV XDG_CACHE_HOME=${XDG_CACHE_HOME}
|
|
|
|
|
2020-10-26 17:00:02 +00:00
|
|
|
# Install deps
|
|
|
|
RUN apt-get update \
|
|
|
|
&& apt-mark auto $(apt-mark showinstall) \
|
|
|
|
&& apt-get install -y postgresql-client-11 python3-pip \
|
|
|
|
&& apt autoremove \
|
|
|
|
&& apt -y full-upgrade \
|
|
|
|
&& rm -rf /var/lib/apt \
|
2020-11-13 08:26:58 +00:00
|
|
|
&& python3 -m pip install -U pip \
|
|
|
|
&& pip install -U psycopg2-binary
|
2020-10-26 17:00:02 +00:00
|
|
|
|
2020-11-22 13:13:38 +00:00
|
|
|
RUN addgroup --system django \
|
|
|
|
&& adduser --system --no-create-home --disabled-password --ingroup django --shell /bin/bash django
|
|
|
|
|
2020-11-14 19:12:39 +00:00
|
|
|
WORKDIR /django
|
2020-10-26 17:00:02 +00:00
|
|
|
|
2020-11-15 13:44:04 +00:00
|
|
|
RUN pip install "pyinventory>=0.6.0"
|
2020-10-26 17:00:02 +00:00
|
|
|
|
|
|
|
|