MT#57453 Switch docker image to bookworm

Run pip3 install with --break-system-packages, to address new PEP 668
specific behavior of pip3, as present in Debian/bookworm:

| error: externally-managed-environment
|
| × This environment is externally managed
| ╰─> To install Python packages system-wide, try apt install
|     python3-xyz, where xyz is the package you are trying to
|     install.
|
|     If you wish to install a non-Debian-packaged Python package,
|     create a virtual environment using python3 -m venv path/to/venv.
|     Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
|     sure you have python3-full installed.
|
|     If you wish to install a non-Debian packaged Python application,
|     it may be easiest to use pipx install xyz, which will manage a
|     virtual environment for you. Make sure you have pipx installed.
|
|     See /usr/share/doc/python3.11/README.venv for more information.
|
| note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
| hint: See PEP 668 for the detailed specification.

Change-Id: I8b27b4dcee8e7b09cc96aff6c45f3747681213ad
mr12.0
Mykola Malkov 3 years ago committed by Michael Prokop
parent faf5846fa9
commit 94c1e03ef9

@ -1,11 +1,11 @@
# DOCKER_NAME=ngcp-panel-tests-rest-api-bullseye
FROM docker.mgm.sipwise.com/sipwise-bullseye:latest
# DOCKER_NAME=ngcp-panel-tests-rest-api-bookworm
FROM docker.mgm.sipwise.com/sipwise-bookworm:latest
# Important! Update this no-op ENV variable when this Dockerfile
# is updated with the current date. It will force refresh of all
# of the base images and things like `apt-get update` won't be using
# old cached versions when the Dockerfile is built.
ENV REFRESHED_AT 2021-05-03
ENV REFRESHED_AT 2023-06-26
# files that get-code generates
COPY t/api-rest/sources.list.d/builddeps.list /etc/apt/sources.list.d/
@ -56,15 +56,15 @@ WORKDIR /home/testuser
#
# you need to put the proper NGCP sources at t/sources.list.d/builddeps.list
# for instance, trunk:
# echo "deb https://deb.sipwise.com/autobuild/ release-trunk-bullseye main" > t/sources.list.d/builddeps.list
# echo "deb https://deb.sipwise.com/autobuild/ release-trunk-bookworm main" > t/sources.list.d/builddeps.list
#
# NOTE: run the following command from root folder of git repository:
# % docker build --tag="ngcp-panel-tests-rest-api-bullseye" -f t/api-rest/Dockerfile .
# % docker run --rm -i -t -v $(pwd):/code:rw ngcp-panel-tests-rest-api-bullseye:latest bash
# % docker build --tag="ngcp-panel-tests-rest-api-bookworm" -f t/api-rest/Dockerfile .
# % docker run --rm -i -t -v $(pwd):/code:rw ngcp-panel-tests-rest-api-bookworm:latest bash
#
# Use the existing docker image (run from ngcp-panel base directory):
# % docker pull docker.mgm.sipwise.com/ngcp-panel-tests-rest-api-bullseye
# % docker run --rm -i -t -v $(pwd):/code:rw docker.mgm.sipwise.com/ngcp-panel-tests-rest-api-bullseye:latest bash
# % docker pull docker.mgm.sipwise.com/ngcp-panel-tests-rest-api-bookworm
# % docker run --rm -i -t -v $(pwd):/code:rw docker.mgm.sipwise.com/ngcp-panel-tests-rest-api-bookworm:latest bash
#
# Inside docker:
# su - testuser

@ -1,11 +1,11 @@
# DOCKER_NAME=ngcp-panel-tests-rest-api2-bullseye
FROM docker.mgm.sipwise.com/sipwise-bullseye:latest
# DOCKER_NAME=ngcp-panel-tests-rest-api2-bookworm
FROM docker.mgm.sipwise.com/sipwise-bookworm:latest
# Important! Update this no-op ENV variable when this Dockerfile
# is updated with the current date. It will force refresh of all
# of the base images and things like `apt-get update` won't be using
# old cached versions when the Dockerfile is built.
ENV REFRESHED_AT 2021-05-03
ENV REFRESHED_AT 2023-06-26
# files that get-code generates
COPY t/api-rest/sources.list.d/builddeps.list /etc/apt/sources.list.d/
@ -35,15 +35,15 @@ WORKDIR /code/
# jump to the next section if you don't want to build yourself!:
#
# you need to put the proper NGCP sources at t/api-rest2/sources.list.d/builddeps.list for instance, trunk:
# % echo "deb https://deb.sipwise.com/autobuild/ release-trunk-bullseye main" > t/api-rest2/sources.list.d/builddeps.list
# % echo "deb https://deb.sipwise.com/autobuild/ release-trunk-bookworm main" > t/api-rest2/sources.list.d/builddeps.list
#
# NOTE: run the following command (from root folder of git repository):
# % docker build --tag="ngcp-panel-tests-rest-api2-bullseye" -f t/api-rest2/Dockerfile .
# % docker run --rm -i -t -v $(pwd):/code:ro -v $(pwd):/results:rw ngcp-panel-tests-rest-api2-bullseye:latest bash
# % docker build --tag="ngcp-panel-tests-rest-api2-bookworm" -f t/api-rest2/Dockerfile .
# % docker run --rm -i -t -v $(pwd):/code:ro -v $(pwd):/results:rw ngcp-panel-tests-rest-api2-bookworm:latest bash
#
# Use the existing docker image (run from ngcp-panel base directory):
# % docker pull docker.mgm.sipwise.com/ngcp-panel-tests-rest-api2-bullseye
# % docker run --rm -i -t -v $(pwd):/code:ro -v $(pwd):/results:rw docker.mgm.sipwise.com/ngcp-panel-tests-rest-api2-bullseye:latest bash
# % docker pull docker.mgm.sipwise.com/ngcp-panel-tests-rest-api2-bookworm
# % docker run --rm -i -t -v $(pwd):/code:ro -v $(pwd):/results:rw docker.mgm.sipwise.com/ngcp-panel-tests-rest-api2-bookworm:latest bash
#
# Inside docker. To run the full REST-API-2 test suite:
# ./t/api-rest2/testrunner $IP_OF_NGCP_SYSTEM # IP_OF_NGCP_SYSTEM can be e.g. IP of a `vagrant up ce-trunk` system (eth1)

@ -1,11 +1,11 @@
# DOCKER_NAME=ngcp-panel-tests-selenium-bullseye
FROM docker.mgm.sipwise.com/sipwise-bullseye:latest
# DOCKER_NAME=ngcp-panel-tests-selenium-bookworm
FROM docker.mgm.sipwise.com/sipwise-bookworm:latest
# Important! Update this no-op ENV variable when this Dockerfile
# is updated with the current date. It will force refresh of all
# of the base images and things like `apt-get update` won't be using
# old cached versions when the Dockerfile is built.
ENV REFRESHED_AT 2021-05-31
ENV REFRESHED_AT 2023-06-26
RUN apt-get update
RUN apt-get install --assume-yes \
@ -60,8 +60,8 @@ RUN wget http://deb.sipwise.com/files/google-chrome-stable_current_amd64.deb &&
RUN wget http://deb.sipwise.com/files/nose2-0.10.0.tar.gz && \
wget http://deb.sipwise.com/files/selenium-3.141.0.tar.gz && \
wget http://deb.sipwise.com/files/coverage-5.5.tar.gz && \
pip3 install coverage-5.5.tar.gz && \
pip3 install nose2-0.10.0.tar.gz selenium-3.141.0.tar.gz && \
pip3 install --break-system-packages coverage-5.5.tar.gz && \
pip3 install --break-system-packages nose2-0.10.0.tar.gz selenium-3.141.0.tar.gz && \
rm -f nose2-0.10.0.tar.gz selenium-3.141.0.tar.gz coverage-5.5.tar.gz
RUN echo "cd /code && ./t/selenium/testrunner 1.2.3.4 /code/ tap" >/home/selenium/.bash_history
@ -75,12 +75,12 @@ COPY t/selenium/jenkins_docker_run /home/selenium/
# ----------------------
# When you want to build the base image from scratch (jump to the next section if you don't want to build yourself!):
# NOTE: run the following command from root folder of git repository:
# % docker build --tag="ngcp-panel-tests-selenium-bullseye" -f t/selenium/Dockerfile .
# % docker run --rm -p 5999:5999 --shm-size 4g -i -t -v $(pwd):/code:rw ngcp-panel-tests-selenium-bullseye:latest bash
# % docker build --tag="ngcp-panel-tests-selenium-bookworm" -f t/selenium/Dockerfile .
# % docker run --rm -p 5999:5999 --shm-size 4g -i -t -v $(pwd):/code:rw ngcp-panel-tests-selenium-bookworm:latest bash
#
# Use the existing docker image:
# % docker pull docker.mgm.sipwise.com/ngcp-panel-tests-selenium-bullseye
# % docker run --rm -p 5999:5999 --shm-size 4g -i -t -v $(pwd):/code:rw docker.mgm.sipwise.com/ngcp-panel-tests-selenium-bullseye:latest bash
# % docker pull docker.mgm.sipwise.com/ngcp-panel-tests-selenium-bookworm
# % docker run --rm -p 5999:5999 --shm-size 4g -i -t -v $(pwd):/code:rw docker.mgm.sipwise.com/ngcp-panel-tests-selenium-bookworm:latest bash
#
# Inside docker:
# su - selenium

Loading…
Cancel
Save