1
Fork 0
ci-images/images/python-script/Dockerfile

34 lines
800 B
Docker

FROM python:3.13.3-slim-bookworm
RUN set -e; \
apt-get update -q; \
apt-get install -qy --no-install-recommends --no-install-suggests \
bc \
curl \
dash \
gettext \
git \
jq \
; \
apt-get clean; \
rm -rf \
/var/cache/apt/* \
/var/lib/apt/lists/* \
/var/log/* \
/usr/local/share/doc/* \
/usr/local/share/man/* \
/usr/share/doc/* \
/usr/share/man/* \
;
# No need for root access for a script runner
RUN useradd -m -d /home/runner -s /bin/bash runner;
WORKDIR /home/runner
USER runner
ENV PATH=/home/runner/.local/bin:$PATH
COPY requirements.txt ./
RUN --mount=type=cache,id=pip-cache,target=/home/runner/.cache/pip \
pip install --user -r requirements.txt;