Upgrade to bookworm-slim

Signed-off-by: Christian König <ckoenig@posteo.de>
This commit is contained in:
Christian König 2023-11-01 00:02:02 +01:00
parent 4366cf6651
commit 7429594ecb
2 changed files with 6 additions and 8 deletions

View File

@ -1,14 +1,12 @@
FROM python:3.10-slim-bullseye
FROM debian:bookworm-slim
# Only works for docker CLIENT (bind mounted socket)
COPY --from=docker:20.10.17 /usr/local/bin/docker /usr/local/bin/
ARG packages
RUN apt-get update && \
apt-get install -y python3-dev curl gcc make \
apt-get install -y python3 python3-pip python3-dev pipenv curl gcc make \
libffi-dev libssl-dev ${packages} \
&& rm -rf /var/lib/apt/lists/* \
&& pip3 install --no-cache-dir -U pip pipenv
&& rm -rf /var/lib/apt/lists/*
RUN curl --proto "=https" -L https://github.com/docker/compose/releases/download/2.10.2/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose && \
chmod +x /usr/local/bin/docker-compose
@ -17,8 +15,8 @@ COPY ./cmd.sh /usr/local/bin/
COPY Pipfile* /root/
WORKDIR /root
RUN pipenv install --system \
&& sed -i 's|/bin/sh|/bin/bash|g' /usr/local/lib/python3.10/site-packages/testinfra/backend/docker.py
RUN pipenv -v install --system \
&& sed -i 's|/bin/sh|/bin/bash|g' /usr/local/lib/python3.11/dist-packages/testinfra/backend/docker.py
RUN echo "set -ex && cmd.sh && \$@" > /usr/local/bin/entrypoint.sh
RUN chmod +x /usr/local/bin/entrypoint.sh

View File

@ -5,7 +5,7 @@ docker build ./src --tag pihole:${GIT_TAG} --no-cache
docker images pihole:${GIT_TAG}
# auto-format the pytest code
python -m black ./test/tests/
python3 -m black ./test/tests/
# TODO: Add junitxml output and have something consume it
# 2 parallel max b/c race condition with docker fixture (I think?)