|
| 1 | +FROM python:3.6-bullseye |
| 2 | +LABEL maintainer="IETF Tools Team <tools-discuss@ietf.org>" |
| 3 | + |
| 4 | +ENV DEBIAN_FRONTEND=noninteractive |
| 5 | + |
| 6 | + |
| 7 | +RUN apt-get update |
| 8 | +RUN apt-get -qy upgrade |
| 9 | + |
| 10 | +# Add Node.js Source |
| 11 | +RUN curl -fsSL https://deb.nodesource.com/setup_16.x | bash - |
| 12 | + |
| 13 | +# Add Docker Source |
| 14 | +RUN curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg |
| 15 | +RUN echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian \ |
| 16 | + $(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null |
| 17 | + |
| 18 | +# Install the packages we need |
| 19 | +RUN apt-get update |
| 20 | +RUN apt-get install -qy \ |
| 21 | + apache2-utils \ |
| 22 | + apt-file \ |
| 23 | + apt-utils \ |
| 24 | + bash \ |
| 25 | + build-essential \ |
| 26 | + curl \ |
| 27 | + docker-ce-cli \ |
| 28 | + enscript \ |
| 29 | + gawk \ |
| 30 | + gcc \ |
| 31 | + ghostscript \ |
| 32 | + git \ |
| 33 | + gnupg \ |
| 34 | + graphviz \ |
| 35 | + jq \ |
| 36 | + less \ |
| 37 | + libcairo2-dev \ |
| 38 | + libgtk2.0-0 \ |
| 39 | + libgtk-3-0 \ |
| 40 | + libnotify-dev \ |
| 41 | + libgconf-2-4 \ |
| 42 | + libgbm-dev \ |
| 43 | + libnss3 \ |
| 44 | + libxss1 \ |
| 45 | + libasound2 \ |
| 46 | + libxtst6 \ |
| 47 | + libmagic-dev \ |
| 48 | + libmariadb-dev \ |
| 49 | + libtidy-dev \ |
| 50 | + locales \ |
| 51 | + mariadb-client \ |
| 52 | + netcat \ |
| 53 | + nodejs \ |
| 54 | + pigz \ |
| 55 | + pv \ |
| 56 | + python3-ipython \ |
| 57 | + ripgrep \ |
| 58 | + rsync \ |
| 59 | + rsyslog \ |
| 60 | + ruby \ |
| 61 | + ruby-rubygems \ |
| 62 | + unzip \ |
| 63 | + wget \ |
| 64 | + xauth \ |
| 65 | + xvfb \ |
| 66 | + yang-tools |
| 67 | + |
| 68 | +# Install kramdown-rfc2629 (ruby) |
| 69 | +RUN gem install kramdown-rfc2629 |
| 70 | + |
| 71 | +# Install chromedriver |
| 72 | +COPY docker/scripts/app-install-chromedriver.sh /tmp/app-install-chromedriver.sh |
| 73 | +RUN sed -i 's/\r$//' /tmp/app-install-chromedriver.sh && \ |
| 74 | + chmod +x /tmp/app-install-chromedriver.sh |
| 75 | +RUN /tmp/app-install-chromedriver.sh |
| 76 | + |
| 77 | +# Get rid of installation files we don't need in the image, to reduce size |
| 78 | +RUN apt-get clean && rm -rf /var/lib/apt/lists/* |
| 79 | + |
| 80 | +# "fake" dbus address to prevent errors |
| 81 | +# https://github.com/SeleniumHQ/docker-selenium/issues/87 |
| 82 | +ENV DBUS_SESSION_BUS_ADDRESS=/dev/null |
| 83 | + |
| 84 | +# avoid million NPM install messages |
| 85 | +ENV npm_config_loglevel warn |
| 86 | +# allow installing when the main user is root |
| 87 | +ENV npm_config_unsafe_perm true |
| 88 | +# disable NPM funding messages |
| 89 | +ENV npm_config_fund false |
| 90 | + |
| 91 | +# Set locale to en_US.UTF-8 |
| 92 | +RUN echo "LC_ALL=en_US.UTF-8" >> /etc/environment && \ |
| 93 | + echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen && \ |
| 94 | + echo "LANG=en_US.UTF-8" > /etc/locale.conf && \ |
| 95 | + dpkg-reconfigure locales && \ |
| 96 | + locale-gen en_US.UTF-8 && \ |
| 97 | + update-locale LC_ALL en_US.UTF-8 |
| 98 | +ENV LC_ALL en_US.UTF-8 |
| 99 | + |
| 100 | +# Install idnits |
| 101 | +ADD https://raw.githubusercontent.com/ietf-tools/idnits-mirror/main/idnits /usr/local/bin/ |
| 102 | +RUN chmod +rx /usr/local/bin/idnits |
| 103 | + |
| 104 | +# Install current datatracker python dependencies |
| 105 | +COPY requirements.txt /tmp/pip-tmp/ |
| 106 | +RUN pip3 --disable-pip-version-check --no-cache-dir install -r /tmp/pip-tmp/requirements.txt \ |
| 107 | + && rm -rf /tmp/pip-tmp |
| 108 | + |
| 109 | +# Turn off rsyslog kernel logging (doesn't work in Docker) |
| 110 | +RUN sed -i '/imklog/s/^/#/' /etc/rsyslog.conf |
| 111 | + |
| 112 | +# Fetch wait-for utility |
| 113 | +ADD https://raw.githubusercontent.com/eficode/wait-for/v2.1.3/wait-for /usr/local/bin/ |
| 114 | +RUN chmod +rx /usr/local/bin/wait-for |
| 115 | + |
| 116 | +# Create workspace |
| 117 | +RUN mkdir -p /workspace |
| 118 | +WORKDIR /workspace |
| 119 | + |
| 120 | +# Install NPM modules |
| 121 | +COPY package.json package.json |
| 122 | +RUN npm install --no-audit |
| 123 | +RUN rm -f package.json package-lock.json |
0 commit comments