From 7ea37c50eb0e3d1b8d580e3dfbef59502bf1162e Mon Sep 17 00:00:00 2001 From: Lukas Garberg Date: Fri, 10 Jan 2025 15:05:42 +0100 Subject: [PATCH 1/2] build: Base Docker images on Ubuntu 24.04 Update the Dockerfiles to base the images on Ubuntu 24.04. Required a few other changes to the Dockerfiles. Not pretty... time to reconsider how the application is run in Docker. --- Dockerfile.nipapd | 6 +++--- Dockerfile.www | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Dockerfile.nipapd b/Dockerfile.nipapd index b7731c1ac..4b6820a46 100644 --- a/Dockerfile.nipapd +++ b/Dockerfile.nipapd @@ -32,7 +32,7 @@ # via a volume. # -FROM ubuntu:jammy +FROM ubuntu:noble MAINTAINER Kristian Larsson ENV DEBIAN_FRONTEND=noninteractive @@ -65,8 +65,8 @@ ENV REQUESTS_CA_BUNDLE=/etc/ssl/certs/ca-certificates.crt COPY nipap /nipap WORKDIR /nipap -RUN pip3 --no-input install --no-cache-dir envtpl==0.7.2 \ - && pip3 --no-input install --no-cache-dir -r requirements.txt \ +RUN pip3 --no-input install --break-system-packages --no-cache-dir envtpl==0.7.2 \ + && pip3 --no-input install -I --break-system-packages --no-cache-dir -r requirements.txt \ && python3 setup.py install EXPOSE 1337 diff --git a/Dockerfile.www b/Dockerfile.www index f81787deb..37e44dadc 100644 --- a/Dockerfile.www +++ b/Dockerfile.www @@ -23,7 +23,7 @@ # database so that you can later login to the web interface. # -FROM ubuntu:jammy +FROM ubuntu:noble MAINTAINER Lukas Garberg @@ -45,7 +45,7 @@ RUN apt-get update -qy && apt-get upgrade -qy \ python3-all \ python3-pip \ python3-dev \ - && pip3 --no-input install --no-cache-dir envtpl==0.7.2 \ + && pip3 --no-input install --break-system-packages --no-cache-dir envtpl==0.7.2 \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* @@ -63,9 +63,9 @@ ENV REQUESTS_CA_BUNDLE=/etc/ssl/certs/ca-certificates.crt COPY pynipap /pynipap COPY nipap /nipap COPY nipap-www /nipap-www -RUN cd /pynipap && python3 setup.py install && \ - cd /nipap && pip3 --no-input install --no-cache-dir -r requirements.txt && python3 setup.py install && \ - cd /nipap-www && pip3 --no-input install --no-cache-dir -r requirements.txt && python3 setup.py install && \ +RUN cd /pynipap && pip3 --no-input install --break-system-packages --no-cache-dir . && \ + cd /nipap && pip3 --no-input install --break-system-packages --no-cache-dir -r requirements.txt && python3 setup.py install && \ + cd /nipap-www && pip3 --no-input install --break-system-packages --no-cache-dir -r requirements.txt && python3 setup.py install && \ cd .. EXPOSE 80 From ae6744bf3c7c27a2b8fd4e43f0cd83962dd2b5fb Mon Sep 17 00:00:00 2001 From: Lukas Garberg Date: Fri, 10 Jan 2025 15:06:13 +0100 Subject: [PATCH 2/2] ci: Run Docker tests on Ubuntu 24.04 --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0e79181b6..517f34325 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -170,7 +170,7 @@ jobs: docker: name: docker - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - name: "Set up QEMU" @@ -239,9 +239,9 @@ jobs: python3-wheel \ python3-nose \ python3-requests \ - postgresql-14-ip4r + postgresql-16-ip4r - sudo -H pip3 install -r nipap/requirements.txt # needed to run test suite + sudo -H pip3 install -I --break-system-packages -r nipap/requirements.txt # needed to run test suite # Set up PostgreSQL sudo service postgresql start