From ebbe65b17e50c28785e1cd0850d61dda55140706 Mon Sep 17 00:00:00 2001 From: "d.kovalenko" Date: Sat, 24 Jan 2026 00:26:47 +0300 Subject: [PATCH] [CI] Ubuntu 24.04 is tested --- .github/workflows/package-verification.yml | 2 + Dockerfile--ubuntu_24_04.tmpl | 57 ++++++++++++++++++++++ 2 files changed, 59 insertions(+) create mode 100644 Dockerfile--ubuntu_24_04.tmpl diff --git a/.github/workflows/package-verification.yml b/.github/workflows/package-verification.yml index c3bf5f8..071a1d8 100644 --- a/.github/workflows/package-verification.yml +++ b/.github/workflows/package-verification.yml @@ -55,6 +55,8 @@ jobs: python: "3.13" - platform: "alpine" python: "3.14" + - platform: "ubuntu_24_04" + python: "3" - platform: "altlinux_10" python: "3" - platform: "altlinux_11" diff --git a/Dockerfile--ubuntu_24_04.tmpl b/Dockerfile--ubuntu_24_04.tmpl new file mode 100644 index 0000000..975b317 --- /dev/null +++ b/Dockerfile--ubuntu_24_04.tmpl @@ -0,0 +1,57 @@ +ARG PYTHON_VERSION + +# --------------------------------------------- base1 +FROM ubuntu:24.04 as base1 + +RUN apt update +RUN apt install -y sudo curl ca-certificates +RUN apt update +RUN apt install -y openssh-server +RUN apt install -y time +RUN apt install -y netcat-traditional + +RUN apt install -y git + +# RUN apt install -y mc + +# --------------------------------------------- base2_with_python-3 +FROM base1 as base2_with_python-3 +RUN apt install -y python3 python3-dev python3-venv +ENV PYTHON_VERSION=3 + +# --------------------------------------------- final +FROM base2_with_python-${PYTHON_VERSION} as final + +EXPOSE 22 + +RUN ssh-keygen -A + +RUN useradd -m test + +# It enables execution of "sudo service ssh start" without password +RUN sh -c "echo test ALL=NOPASSWD:/usr/sbin/service ssh start" >> /etc/sudoers + +ADD . /home/test/testgres +RUN chown -R test /home/test/testgres +WORKDIR /home/test/testgres + +ENV LANG=C.UTF-8 + +USER test + +RUN chmod 700 ~/ +RUN mkdir -p ~/.ssh + +ENTRYPOINT sh -c " \ +#set -eux; \ +echo HELLO FROM ENTRYPOINT; \ +echo HOME DIR IS [`realpath ~/`]; \ +service ssh enable; \ +sudo service ssh start; \ +ssh-keyscan -H localhost >> ~/.ssh/known_hosts; \ +ssh-keyscan -H 127.0.0.1 >> ~/.ssh/known_hosts; \ +ssh-keygen -t rsa -f ~/.ssh/id_rsa -q -N ''; \ +cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys; \ +chmod 600 ~/.ssh/authorized_keys; \ +ls -la ~/.ssh/; \ +TEST_FILTER=\"\" bash ./run_tests3.sh;"