add postgresql-client to let it docker build

This commit is contained in:
burnettk 2022-12-22 20:42:49 -05:00
parent f1f2848762
commit 93de3d8f4e
1 changed files with 11 additions and 6 deletions

View File

@ -3,17 +3,22 @@ FROM ghcr.io/sartography/python:3.11
RUN pip install poetry
RUN useradd _gunicorn --no-create-home --user-group
# postgresql-client is required to poetry install (psycopg2)
RUN set -xe \
&& apt-get remove -y \
gcc \
libssl-dev \
postgresql-client \
python3-dev \
&& apt-get autoremove -y \
&& apt-get clean -y \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
ADD pyproject.toml poetry.lock /app/
ADD connectors /app/connectors
RUN poetry install
RUN set -xe \
&& apt-get remove -y gcc python3-dev libssl-dev \
&& apt-get autoremove -y \
&& apt-get clean -y \
&& rm -rf /var/lib/apt/lists/*
COPY . /app/
# run poetry install again AFTER copying the app into the image