|
| 1 | +FROM ubuntu:22.04 |
| 2 | + |
| 3 | +ENV DEBIAN_FRONTEND=noninteractive \ |
| 4 | + XDG_CACHE_HOME=/root/.cache |
| 5 | + |
| 6 | +# Update and install required packages |
| 7 | +RUN apt-get update && apt-get install -y \ |
| 8 | + iproute2 rsync git traceroute unzip bzip2 \ |
| 9 | + libbz2-dev libffi-dev libsqlite3-dev rpm expect \ |
| 10 | + make curl wget tar procps sudo findutils grep \ |
| 11 | + libncurses-dev libssl-dev zlib1g-dev libkrb5-dev \ |
| 12 | + cmake build-essential \ |
| 13 | + python3.10\ |
| 14 | + python3-pip python3-setuptools python3-dev python3-wheel \ |
| 15 | + libxml2-dev libxslt1-dev \ |
| 16 | + texlive texlive-latex-extra texlive-fonts-recommended \ |
| 17 | + texlive-xetex texlive-lang-english latexmk \ |
| 18 | + imagemagick inkscape \ |
| 19 | + fonts-liberation \ |
| 20 | + && apt-get clean \ |
| 21 | + && rm -rf /var/lib/apt/lists/* |
| 22 | + |
| 23 | +# Optional: set python alternatives if needed |
| 24 | +# update-alternatives --install /usr/bin/python python /usr/bin/python3.10 1 |
| 25 | + |
| 26 | +# Create pip symlink and install Python tools |
| 27 | +RUN ln -sf /usr/bin/pip3 /usr/bin/pip \ |
| 28 | + && pip install --no-cache-dir --user 'tox>=3.8.0' os-testr |
| 29 | + |
| 30 | +# Sudo configuration similar to original |
| 31 | +RUN mv /etc/sudoers /etc/sudoers.d/zuul \ |
| 32 | + && grep includedir /etc/sudoers.d/zuul > /etc/sudoers \ |
| 33 | + && sed -e 's/.*includedir.*//' -i /etc/sudoers.d/zuul \ |
| 34 | + && chmod 440 /etc/sudoers |
| 35 | + |
| 36 | +# Add zuul user |
| 37 | +RUN echo 'zuul:x:0:0:root:/root:/bin/bash' >> /etc/passwd |
| 38 | + |
| 39 | +# Set PATH and working directory |
| 40 | +ENV PATH=/root/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin |
| 41 | +WORKDIR /root |
0 commit comments