From 3a3b3869837df857f9772f0b1eb2b89809d8469b Mon Sep 17 00:00:00 2001 From: Alvaro Lopez Garcia Date: Mon, 20 Nov 2023 11:50:50 +0100 Subject: [PATCH 1/3] Include 22.04 as base image --- base/ubuntu/22.04/Dockerfile | 39 ++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 base/ubuntu/22.04/Dockerfile diff --git a/base/ubuntu/22.04/Dockerfile b/base/ubuntu/22.04/Dockerfile new file mode 100644 index 0000000..2d88b67 --- /dev/null +++ b/base/ubuntu/22.04/Dockerfile @@ -0,0 +1,39 @@ +FROM ubuntu:22.04 +MAINTAINER Pablo Orviz + +USER root + +RUN apt-get update \ + && apt-get install --no-install-recommends -y openssh-server \ + sudo \ + openjdk-8-jdk \ + && rm -rf /var/lib/apt/lists/* + +# Jenkins sshd +RUN useradd -m -u 1001 -d /home/jenkins -s /bin/sh jenkins +RUN mkdir /home/jenkins/.ssh &&\ + chmod 0700 /home/jenkins/.ssh &&\ + echo "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC031xiODGimXMUdXNlFcGR5/MqUfRN65Gkwt29gszi9GFraZd300Gbxfknru4VsDpk0ULTg1z0A+pxpWanFTCnYW9cR1LlC7Cpw3L+p9Lu/TsjBJC0OsxHEr6p5frb85ChHJv381Vr1OIWmnDGrdSbbNLM3+UqtVARDDExl4+dQIJzzPFZZMpB2wZqWcR5uftlrat/4Zrew+4fQHNMAbGfUaa5TD94cXFmuFro3lzpbMjfKB0FlIBYtkYXkYqoRI8ujzN02icE4c4CocdBEFt2FbaT/9EtFeAltCxprZt5566f9uJIpJ1FR8DOOdrxnQTkw+r7cLEgh3kBUnIet5JX jenkins@jenkins-indigo" > /home/jenkins/.ssh/authorized_keys &&\ + echo "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC4t0v8CTpyV4FzP2xKaPTQ/Y2yjKbLqelWhJ5ZNy2bw/N9zpQMl/1xKGTz9j8TtLyEfaEcODxjbXCsc7XUwxB5SRp1yAiw2ddeFvACj9/Oyr2SYpHSMz9W+p0Pa0Dzi4+pd+w7qc9lXm1Ei8fLrZf17uyFJyQliobHh3vbWcTauJLs68ym3niY52wTjXbWxXGmERGU1F+Baue/LFta2RIP5Z+m7zWzqbFpECgYMbPCKDq8QRA6649B6f0qLmJOF1yALlKr8yfzuo48eLp8hyYE4gV8CQxr4L/aQUEeirEywGipiKsOIgsJCu88wDMsQHlP32ERLQfsjpLDTKod6Q6z jenkins@jenkins-egi" >> /home/jenkins/.ssh/authorized_keys &&\ + echo "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCpYfB8piEBD1BUlo9+zFVQKKCGrFtpaNrhL8JMVdHwIK8a7SUAQQnQD9zO7VwMgjdrXngkWV8pGb6JD8ChODPmScKrw4Mk5ULk5cJ6yT91/rh09OcO6HEvZkl/WJIaVTGBIBFGRrvDvxxphn1Yc/OTPBUbDrxeospxNhc3DzfifAIKjn2tb6lVYTh5mU9aL4Hyh7a/HMv4WewSMThTiOCXGJIJBOq0qdfurdoacQRuGoUykW74XZ8SzZkHSssAH6wc5pz8TwxoNOYDGX+arO3gI3+MbE9oPiOEwGZ7WAxX0L1xwO164DBxuU1HkF4frbD5c5Oy4dBHC082Hl2m6C6Z jenkins@infn-cloud" >> /home/jenkins/.ssh/authorized_keys &&\ + chown -R jenkins:jenkins /home/jenkins/.ssh +RUN echo "jenkins ALL=(ALL:ALL) NOPASSWD:ALL" >> /etc/sudoers + +# sshd +RUN sed -i /etc/ssh/sshd_config \ + -e 's/#PermitRootLogin.*/PermitRootLogin no/' \ + -e 's/#RSAAuthentication.*/RSAAuthentication yes/' \ + -e 's/#PasswordAuthentication.*/PasswordAuthentication no/' \ + -e 's/#SyslogFacility.*/SyslogFacility AUTH/' \ + -e 's/#LogLevel.*/LogLevel INFO/' +RUN mkdir -p /run/sshd + +# locales +RUN apt-get update \ + && apt-get install --no-install-recommends -y locales \ + && rm -rf /var/lib/apt/lists/* +RUN locale-gen en_US.UTF-8 + +EXPOSE 22 + +CMD ["/usr/sbin/sshd", "-D"] From 116fac4356419d8e94f730f419f40181ff5fd302 Mon Sep 17 00:00:00 2001 From: Alvaro Lopez Garcia Date: Mon, 20 Nov 2023 11:39:39 +0100 Subject: [PATCH 2/3] Include Py3.11 image --- python/3.11/Dockerfile | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 python/3.11/Dockerfile diff --git a/python/3.11/Dockerfile b/python/3.11/Dockerfile new file mode 100644 index 0000000..c7c41dd --- /dev/null +++ b/python/3.11/Dockerfile @@ -0,0 +1,32 @@ +FROM indigodatacloud/ci-images:base-u2204 +MAINTAINER Pablo Orviz + +RUN apt-get update \ + && apt-get install --no-install-recommends -y wget \ + git \ + python3.11 \ + build-essential \ + libcurl4-gnutls-dev \ + libffi-dev \ + libssl-dev \ + libxml2-dev \ + libxslt1-dev \ + libgnutls28-dev \ + default-libmysqlclient-dev libsqlite3-dev \ + curl \ + && rm -rf /var/lib/apt/lists/* + +RUN update-alternatives --install /usr/bin/python python /usr/bin/python3.11 11 +RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.11 11 + +RUN curl -s -L https://bootstrap.pypa.io/get-pip.py | python +RUN pip install tox flake8 pylint pydocstyle pep8 bandit +# otherwise issues with twine<=1.10.0 +RUN pip install twine==1.11.0 +RUN pip install -U wheel setuptools + +# Standard SSH port +EXPOSE 22 + +# Default command +CMD ["/usr/sbin/sshd", "-D"] From c4eedcbbb3b0f29447da892ccad465d93fbe472b Mon Sep 17 00:00:00 2001 From: Alvaro Lopez Garcia Date: Mon, 18 Mar 2024 11:50:18 +0100 Subject: [PATCH 3/3] Include netifaces from APT --- python/3.11/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/python/3.11/Dockerfile b/python/3.11/Dockerfile index c7c41dd..0df585a 100644 --- a/python/3.11/Dockerfile +++ b/python/3.11/Dockerfile @@ -14,6 +14,7 @@ RUN apt-get update \ libgnutls28-dev \ default-libmysqlclient-dev libsqlite3-dev \ curl \ + python3-netifaces \ && rm -rf /var/lib/apt/lists/* RUN update-alternatives --install /usr/bin/python python /usr/bin/python3.11 11