FROM python:3.12-slim-bookworm

LABEL parent-images=python312

# Run updates
RUN apt-get -y update \
  && apt-get -y upgrade \
  && apt-get -y install curl procps \
  && apt-get -y clean \
  && rm -rf /var/lib/apt/lists/*

# manual upgrade until base image is updated to fix docker vulnerability.
RUN pip install --upgrade "pip>=26.1.2"

# Add worker user
RUN adduser -u 1010 --disabled-password --comment "" worker

# Run container as the worker user
USER worker
