Skip to content

Commit 7e9a46a

Browse files
authored
feat: move base containers to bookworm (ietf-tools#8710)
1 parent 9dd25b9 commit 7e9a46a

3 files changed

Lines changed: 15 additions & 22 deletions

File tree

docker/base.Dockerfile

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM python:3.9-bullseye
1+
FROM python:3.9-bookworm
22
LABEL maintainer="IETF Tools Team <tools-discuss@ietf.org>"
33

44
ENV DEBIAN_FRONTEND=noninteractive
@@ -14,6 +14,9 @@ RUN apt-get install -y --no-install-recommends ca-certificates curl gnupg \
1414
&& mkdir -p /etc/apt/keyrings\
1515
&& curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
1616
RUN echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list
17+
RUN echo "Package: nodejs" >> /etc/apt/preferences.d/preferences && \
18+
echo "Pin: origin deb.nodesource.com" >> /etc/apt/preferences.d/preferences && \
19+
echo "Pin-Priority: 1001" >> /etc/apt/preferences.d/preferences
1720

1821
# Add Docker Source
1922
RUN curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
@@ -56,12 +59,13 @@ RUN apt-get update --fix-missing && apt-get install -qy --no-install-recommends
5659
libmagic-dev \
5760
libmariadb-dev \
5861
libmemcached-tools \
62+
libyang2-tools \
5963
locales \
6064
make \
6165
mariadb-client \
6266
memcached \
6367
nano \
64-
netcat \
68+
netcat-traditional \
6569
nodejs \
6670
pgloader \
6771
pigz \
@@ -77,7 +81,6 @@ RUN apt-get update --fix-missing && apt-get install -qy --no-install-recommends
7781
wget \
7882
xauth \
7983
xvfb \
80-
yang-tools \
8184
zsh
8285

8386
# Install kramdown-rfc2629 (ruby)
@@ -106,11 +109,11 @@ RUN apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/* /va
106109
ENV DBUS_SESSION_BUS_ADDRESS=/dev/null
107110

108111
# avoid million NPM install messages
109-
ENV npm_config_loglevel warn
112+
ENV npm_config_loglevel=warn
110113
# allow installing when the main user is root
111-
ENV npm_config_unsafe_perm true
114+
ENV npm_config_unsafe_perm=true
112115
# disable NPM funding messages
113-
ENV npm_config_fund false
116+
ENV npm_config_fund=false
114117

115118
# Set locale to en_US.UTF-8
116119
RUN echo "LC_ALL=en_US.UTF-8" >> /etc/environment && \
@@ -119,7 +122,7 @@ RUN echo "LC_ALL=en_US.UTF-8" >> /etc/environment && \
119122
dpkg-reconfigure locales && \
120123
locale-gen en_US.UTF-8 && \
121124
update-locale LC_ALL en_US.UTF-8
122-
ENV LC_ALL en_US.UTF-8
125+
ENV LC_ALL=en_US.UTF-8
123126

124127
# Install idnits
125128
ADD https://raw.githubusercontent.com/ietf-tools/idnits-mirror/main/idnits /usr/local/bin/

docker/scripts/app-setup-debian.sh

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
# Syntax: ./common-debian.sh [install zsh flag] [username] [user UID] [user GID] [upgrade packages flag] [install Oh My Zsh! flag] [Add non-free packages]
1111

1212
set -e
13-
1413
INSTALL_ZSH=${1:-"true"}
1514
USERNAME=${2:-"automatic"}
1615
USER_UID=${3:-"automatic"}
@@ -116,18 +115,9 @@ if [ "${PACKAGES_ALREADY_INSTALLED}" != "true" ]; then
116115
# Needed for adding manpages-posix and manpages-posix-dev which are non-free packages in Debian
117116
if [ "${ADD_NON_FREE_PACKAGES}" = "true" ]; then
118117
# Bring in variables from /etc/os-release like VERSION_CODENAME
119-
. /etc/os-release
120-
sed -i -E "s/deb http:\/\/(deb|httpredir)\.debian\.org\/debian ${VERSION_CODENAME} main/deb http:\/\/\1\.debian\.org\/debian ${VERSION_CODENAME} main contrib non-free/" /etc/apt/sources.list
121-
sed -i -E "s/deb-src http:\/\/(deb|httredir)\.debian\.org\/debian ${VERSION_CODENAME} main/deb http:\/\/\1\.debian\.org\/debian ${VERSION_CODENAME} main contrib non-free/" /etc/apt/sources.list
122-
sed -i -E "s/deb http:\/\/(deb|httpredir)\.debian\.org\/debian ${VERSION_CODENAME}-updates main/deb http:\/\/\1\.debian\.org\/debian ${VERSION_CODENAME}-updates main contrib non-free/" /etc/apt/sources.list
123-
sed -i -E "s/deb-src http:\/\/(deb|httpredir)\.debian\.org\/debian ${VERSION_CODENAME}-updates main/deb http:\/\/\1\.debian\.org\/debian ${VERSION_CODENAME}-updates main contrib non-free/" /etc/apt/sources.list
124-
sed -i "s/deb http:\/\/security\.debian\.org\/debian-security ${VERSION_CODENAME}\/updates main/deb http:\/\/security\.debian\.org\/debian-security ${VERSION_CODENAME}\/updates main contrib non-free/" /etc/apt/sources.list
125-
sed -i "s/deb-src http:\/\/security\.debian\.org\/debian-security ${VERSION_CODENAME}\/updates main/deb http:\/\/security\.debian\.org\/debian-security ${VERSION_CODENAME}\/updates main contrib non-free/" /etc/apt/sources.list
126-
sed -i "s/deb http:\/\/deb\.debian\.org\/debian ${VERSION_CODENAME}-backports main/deb http:\/\/deb\.debian\.org\/debian ${VERSION_CODENAME}-backports main contrib non-free/" /etc/apt/sources.list
127-
sed -i "s/deb-src http:\/\/deb\.debian\.org\/debian ${VERSION_CODENAME}-backports main/deb http:\/\/deb\.debian\.org\/debian ${VERSION_CODENAME}-backports main contrib non-free/" /etc/apt/sources.list
128-
# Handle bullseye location for security https://www.debian.org/releases/bullseye/amd64/release-notes/ch-information.en.html
129-
sed -i "s/deb http:\/\/security\.debian\.org\/debian-security ${VERSION_CODENAME}-security main/deb http:\/\/security\.debian\.org\/debian-security ${VERSION_CODENAME}-security main contrib non-free/" /etc/apt/sources.list
130-
sed -i "s/deb-src http:\/\/security\.debian\.org\/debian-security ${VERSION_CODENAME}-security main/deb http:\/\/security\.debian\.org\/debian-security ${VERSION_CODENAME}-security main contrib non-free/" /etc/apt/sources.list
118+
. /etc/os-release
119+
sed -i -E "s/Components: main/Components: main contrib non-free/" /etc/apt/sources.list.d/debian.sources
120+
131121
echo "Running apt-get update..."
132122
apt-get update
133123
package_list="${package_list} manpages-posix manpages-posix-dev"

ietf/submit/tests.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1888,7 +1888,7 @@ def test_submit_invalid_yang(self):
18881888
r = self.client.get(status_url)
18891889
q = PyQuery(r.content)
18901890
#
1891-
self.assertContains(r, 'The yang validation returned 1 error')
1891+
self.assertContains(r, 'The yang validation returned 3 errors')
18921892
#
18931893
m = q('#yang-validation-message').text()
18941894
for command in ['xym', 'pyang', 'yanglint']:
@@ -1898,7 +1898,7 @@ def test_submit_invalid_yang(self):
18981898
self.assertIn("draft-yang-testing-invalid-00.txt", m)
18991899
self.assertIn("error: syntax error: illegal keyword: ;", m)
19001900
if settings.SUBMIT_YANGLINT_COMMAND and os.path.exists(settings.YANGLINT_BINARY):
1901-
self.assertIn("No validation errors", m)
1901+
self.assertIn('libyang err : Parsing module "ietf-yang-metadata" failed.', m)
19021902

19031903
def submit_conflicting_submissiondocevent_rev(self, new_rev='01', existing_rev='01'):
19041904
"""Test submitting a rev when an equal or later SubmissionDocEvent rev exists

0 commit comments

Comments
 (0)