The Ubuntu 24.04 marks the Python installation as externally managed
this prevents pip from installing system-wide packages. Set the
PIP_BREAK_SYSTEM_PACKAGES env variable that allows pip to ignore
this and install the packages anyway.

At the same time the Python Babel fails to detect timezone when
it is just set to UTC. Setting it to Etc/UTC fixes the issue:

ValueError: ZoneInfo keys may not be absolute paths, got: /UTC

Signed-off-by: Ales Musil <[email protected]>
---
 utilities/containers/ubuntu/Dockerfile | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/utilities/containers/ubuntu/Dockerfile 
b/utilities/containers/ubuntu/Dockerfile
index ac1e6a5bf..c1ff711c5 100755
--- a/utilities/containers/ubuntu/Dockerfile
+++ b/utilities/containers/ubuntu/Dockerfile
@@ -1,4 +1,4 @@
-FROM registry.hub.docker.com/library/ubuntu:22.04
+FROM registry.hub.docker.com/library/ubuntu:24.04
 
 ARG CONTAINERS_PATH
 
@@ -37,6 +37,7 @@ RUN apt update -y \
         selinux-policy-dev \
         sudo \
         tcpdump \
+        tzdata \
         wget \
     && \
     apt autoremove \
@@ -73,6 +74,10 @@ WORKDIR /workspace
 
 COPY $CONTAINERS_PATH/py-requirements.txt /tmp/py-requirements.txt
 
+# Ubuntu 24.04 marks the Python installation as externally managed, allow pip
+# to install the packages despite that.
+ENV PIP_BREAK_SYSTEM_PACKAGES 1
+
 # Update and install pip dependencies
 RUN python3 -m pip install --upgrade pip \
     && \
@@ -80,4 +85,7 @@ RUN python3 -m pip install --upgrade pip \
     && \
     python3 -m pip install -r /tmp/py-requirements.txt
 
+# The Python Babel fails to detect timezone when it is set to UTC only.
+ENV TZ Etc/UTC
+
 CMD ["/sbin/init"]
-- 
2.44.0

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to