From 812f56505f9c46fa2b44f5869186d0f34de268d5 Mon Sep 17 00:00:00 2001 From: Yurii Hordynskyi Date: Thu, 28 Nov 2024 18:34:49 +0200 Subject: [PATCH] Addressed review comments. Signed-off-by: Yurii Hordynskyi --- build.sh | 8 -------- dockerfiles/bookworm/Dockerfile | 6 ++++-- dockerfiles/bookworm/Dockerfile.client | 6 ++++-- dockerfiles/bookworm/Dockerfile.saithrift-client | 6 ++++-- dockerfiles/bookworm/Dockerfile.saithrift-server | 6 ++++-- dockerfiles/bookworm/Dockerfile.server | 6 ++++-- 6 files changed, 20 insertions(+), 18 deletions(-) diff --git a/build.sh b/build.sh index 6368260c..26683be4 100755 --- a/build.sh +++ b/build.sh @@ -145,14 +145,6 @@ print-build-options() { trap print-build-options EXIT -# Link the pip configuration file to copy to the Docker image -if [ "${BASE_OS}" = "bookworm" ]; then - rm -f pip.conf - if [ -f dockerfiles/${BASE_OS}/pip.conf ]; then - ln -s dockerfiles/${BASE_OS}/pip.conf pip.conf - fi -fi - # Build base Docker image if [ "${IMAGE_TYPE}" = "standalone" ]; then docker build -f dockerfiles/${BASE_OS}/Dockerfile -t sc-base:${BASE_OS} . diff --git a/dockerfiles/bookworm/Dockerfile b/dockerfiles/bookworm/Dockerfile index c2e80c0f..97eb1210 100644 --- a/dockerfiles/bookworm/Dockerfile +++ b/dockerfiles/bookworm/Dockerfile @@ -3,8 +3,10 @@ FROM debian:bookworm-slim ## Make apt-get non-interactive ENV DEBIAN_FRONTEND=noninteractive -# Copy the pip.conf file -COPY pip.conf /root/.config/pip/pip.conf +# Generate the pip configuration file +RUN mkdir -p /root/.config/pip \ + && echo "[global]" > /root/.config/pip/pip.conf \ + && echo "break-system-packages = true" >> /root/.config/pip/pip.conf # Install generic packages RUN apt-get -o Acquire::Check-Valid-Until=false update && apt-get install -y \ diff --git a/dockerfiles/bookworm/Dockerfile.client b/dockerfiles/bookworm/Dockerfile.client index b043e05e..802f90b7 100644 --- a/dockerfiles/bookworm/Dockerfile.client +++ b/dockerfiles/bookworm/Dockerfile.client @@ -3,8 +3,10 @@ FROM debian:bookworm-slim ## Make apt-get non-interactive ENV DEBIAN_FRONTEND=noninteractive -# Copy the pip.conf file -COPY pip.conf /root/.config/pip/pip.conf +# Generate the pip configuration file +RUN mkdir -p /root/.config/pip \ + && echo "[global]" > /root/.config/pip/pip.conf \ + && echo "break-system-packages = true" >> /root/.config/pip/pip.conf # Install generic packages RUN apt-get -o Acquire::Check-Valid-Until=false update && apt-get install -y \ diff --git a/dockerfiles/bookworm/Dockerfile.saithrift-client b/dockerfiles/bookworm/Dockerfile.saithrift-client index 073fd725..630545e2 100644 --- a/dockerfiles/bookworm/Dockerfile.saithrift-client +++ b/dockerfiles/bookworm/Dockerfile.saithrift-client @@ -1,7 +1,9 @@ FROM sc-client:bookworm -# Copy the pip.conf file -COPY pip.conf /root/.config/pip/pip.conf +# Generate the pip configuration file +RUN mkdir -p /root/.config/pip \ + && echo "[global]" > /root/.config/pip/pip.conf \ + && echo "break-system-packages = true" >> /root/.config/pip/pip.conf ENV SAIGEN_DEPS libgetopt-long-descriptive-perl libconst-fast-perl \ libtemplate-perl libnamespace-autoclean-perl \ diff --git a/dockerfiles/bookworm/Dockerfile.saithrift-server b/dockerfiles/bookworm/Dockerfile.saithrift-server index 09f30980..9f68285d 100644 --- a/dockerfiles/bookworm/Dockerfile.saithrift-server +++ b/dockerfiles/bookworm/Dockerfile.saithrift-server @@ -3,8 +3,10 @@ FROM debian:bookworm-slim ## Make apt-get non-interactive ENV DEBIAN_FRONTEND=noninteractive -# Copy the pip.conf file -COPY pip.conf /root/.config/pip/pip.conf +# Generate the pip configuration file +RUN mkdir -p /root/.config/pip \ + && echo "[global]" > /root/.config/pip/pip.conf \ + && echo "break-system-packages = true" >> /root/.config/pip/pip.conf COPY sai.env / diff --git a/dockerfiles/bookworm/Dockerfile.server b/dockerfiles/bookworm/Dockerfile.server index 7730ea4d..9621df4a 100644 --- a/dockerfiles/bookworm/Dockerfile.server +++ b/dockerfiles/bookworm/Dockerfile.server @@ -3,8 +3,10 @@ FROM debian:bookworm-slim ## Make apt-get non-interactive ENV DEBIAN_FRONTEND=noninteractive -# Copy the pip.conf file -COPY pip.conf /root/.config/pip/pip.conf +# Generate the pip configuration file +RUN mkdir -p /root/.config/pip \ + && echo "[global]" > /root/.config/pip/pip.conf \ + && echo "break-system-packages = true" >> /root/.config/pip/pip.conf # Install generic packages RUN apt-get -o Acquire::Check-Valid-Until=false update && apt-get install -y \