FROM --platform=amd64 python:3.10-slim-buster

LABEL maintainer="hkim@lji.org"

RUN apt update && \
    pip install --upgrade setuptools pip && \
    # install C compiler
    apt-get update && \
    apt-get -y install build-essential manpages-dev libpq-dev

RUN mkdir -p /src/pepx

WORKDIR /src/pepx

# Add requirements to utilize cache layering to optimize Docker build
COPY requirements.txt .

RUN pip install --use-pep517 -r requirements.txt

COPY . ./

CMD ["tail", "-f", "/dev/null"]