1+ FROM python:3.9-bullseye
2+ LABEL maintainer="IETF Tools Team <tools-discuss@ietf.org>"
3+
4+ ENV DEBIAN_FRONTEND=noninteractive
5+
6+ # Update system packages
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 --fix-missing && apt-get install -qy \
20+ apache2-utils \
21+ apt-file \
22+ apt-utils \
23+ bash \
24+ build-essential \
25+ curl \
26+ default-jdk \
27+ docker-ce-cli \
28+ enscript \
29+ gawk \
30+ g++ \
31+ gcc \
32+ ghostscript \
33+ git \
34+ gnupg \
35+ graphviz \
36+ jq \
37+ less \
38+ libcairo2-dev \
39+ libgtk2.0-0 \
40+ libgtk-3-0 \
41+ libnotify-dev \
42+ libgconf-2-4 \
43+ libgbm-dev \
44+ libnss3 \
45+ libxss1 \
46+ libasound2 \
47+ libxtst6 \
48+ libmagic-dev \
49+ libmariadb-dev \
50+ libmemcached-tools \
51+ locales \
52+ make \
53+ mariadb-client \
54+ memcached \
55+ nano \
56+ netcat \
57+ nodejs \
58+ pigz \
59+ pv \
60+ python3-ipython \
61+ ripgrep \
62+ rsync \
63+ rsyslog \
64+ ruby \
65+ ruby-rubygems \
66+ unzip \
67+ wget \
68+ xauth \
69+ xvfb \
70+ yang-tools \
71+ zsh
72+
73+ # Install kramdown-rfc2629 (ruby)
74+ RUN gem install kramdown-rfc2629
75+
76+ # Install chromedriver
77+ COPY docker/scripts/app-install-chromedriver.sh /tmp/app-install-chromedriver.sh
78+ RUN sed -i 's/\r $//' /tmp/app-install-chromedriver.sh && \
79+ chmod +x /tmp/app-install-chromedriver.sh
80+ RUN /tmp/app-install-chromedriver.sh
81+
82+ # Fix /dev/shm permissions for chromedriver
83+ RUN chmod 1777 /dev/shm
84+
85+ # Activate Yarn
86+ RUN corepack enable
87+
88+ # Get rid of installation files we don't need in the image, to reduce size
89+ RUN apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/*
90+
91+ # "fake" dbus address to prevent errors
92+ # https://github.com/SeleniumHQ/docker-selenium/issues/87
93+ ENV DBUS_SESSION_BUS_ADDRESS=/dev/null
94+
95+ # avoid million NPM install messages
96+ ENV npm_config_loglevel warn
97+ # allow installing when the main user is root
98+ ENV npm_config_unsafe_perm true
99+ # disable NPM funding messages
100+ ENV npm_config_fund false
101+
102+ # Set locale to en_US.UTF-8
103+ RUN echo "LC_ALL=en_US.UTF-8" >> /etc/environment && \
104+ echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen && \
105+ echo "LANG=en_US.UTF-8" > /etc/locale.conf && \
106+ dpkg-reconfigure locales && \
107+ locale-gen en_US.UTF-8 && \
108+ update-locale LC_ALL en_US.UTF-8
109+ ENV LC_ALL en_US.UTF-8
110+
111+ # Install idnits
112+ ADD https://raw.githubusercontent.com/ietf-tools/idnits-mirror/main/idnits /usr/local/bin/
113+ RUN chmod +rx /usr/local/bin/idnits
114+
115+ # Turn off rsyslog kernel logging (doesn't work in Docker)
116+ RUN sed -i '/imklog/s/^/#/' /etc/rsyslog.conf
117+
118+ # Colorize the bash shell
119+ RUN sed -i 's/#force_color_prompt=/force_color_prompt=/' /root/.bashrc
120+
121+ # Install current datatracker python dependencies
122+ COPY requirements.txt /tmp/pip-tmp/
123+ RUN pip3 --disable-pip-version-check --no-cache-dir install -r /tmp/pip-tmp/requirements.txt \
124+ && rm -rf /tmp/pip-tmp
125+
126+ # Turn off rsyslog kernel logging (doesn't work in Docker)
127+ RUN sed -i '/imklog/s/^/#/' /etc/rsyslog.conf
128+
129+ # Fetch wait-for utility
130+ ADD https://raw.githubusercontent.com/eficode/wait-for/v2.1.3/wait-for /usr/local/bin/
131+ RUN chmod +rx /usr/local/bin/wait-for
132+
133+ # Create workspace
134+ RUN mkdir -p /workspace
135+ WORKDIR /workspace
0 commit comments