# Built on the Workpeg function base: Python 3.12, this SDK at one exact
# version, a non-root user (appuser, 10001), WORKDIR /app and the runtime's
# ENTRYPOINT. `workpeg project create` wrote the version of the SDK it ran as.
FROM registry.gitlab.com/workpeg/workpeg-sdk/pegfn-base:REPLACE_PEGFN_BASE_VERSION

# Workpeg builds this image with no network, so nothing here may download.
# Extra packages come from wheels/, filled before you build or submit with
# pip download (wheels/README.txt has the command, for Linux x86_64 and
# Python 3.12, which is what Workpeg runs). Never list workpeg itself.
COPY wheels /wheels
COPY requirements.txt /app/requirements.txt
USER root
RUN pip install --no-cache-dir --no-index --find-links=/wheels -r /app/requirements.txt
USER appuser

COPY app /app/app
