ARG PYTHON_VERSION=3.12 FROM python:${PYTHON_VERSION}-slim as base # Any python libraries that require system libraries to be installed will likely # need the following packages in order to build RUN apt-get update && \ apt-get -y upgrade && \ apt-get install -y build-essential git libpq-dev postgresql-15-postgis-3 && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* RUN useradd -ms /bin/bash newuser USER newuser WORKDIR /app COPY . /app RUN python -m pip install -e .[dev,server] --user