Skip to content

Commit 9ebeb9e

Browse files
committed
YETUS-1271. Upgrade to Ubuntu 24.04 (Noble)
1 parent fc00d35 commit 9ebeb9e

1 file changed

Lines changed: 22 additions & 25 deletions

File tree

  • precommit/src/main/shell/test-patch-docker

precommit/src/main/shell/test-patch-docker/Dockerfile

Lines changed: 22 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#
2323
###############
2424

25-
FROM ubuntu:jammy AS yetusbase
25+
FROM ubuntu:noble AS yetusbase
2626

2727
## NOTE to committers: if this gets moved from Xenial to something else, be
2828
## sure to also fix the gpg link in asf-site-src as appropriate
@@ -51,6 +51,7 @@ RUN apt-get -q update && apt-get -q install --no-install-recommends -y \
5151
gpg \
5252
gpg-agent \
5353
libffi-dev \
54+
libicu-dev \
5455
libxml2-utils \
5556
locales \
5657
patch \
@@ -249,7 +250,7 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"]
249250
# _in_ the container and not outside of it!
250251
####
251252
# hadolint ignore=DL3008,DL3059
252-
RUN apt-get -q update && apt-get -q install --no-install-recommends -y default-jre-headless openjdk-11-jdk-headless \
253+
RUN apt-get -q update && apt-get -q install --no-install-recommends -y default-jre-headless openjdk-17-jdk-headless \
253254
&& apt-get clean \
254255
&& rm -rf /var/lib/apt/lists/*
255256
# this var will get yetus_abs'd when run under precommit so should be relatively safe
@@ -283,13 +284,11 @@ RUN apt-get -q update && apt-get -q install --no-install-recommends -y cmake \
283284
###
284285
# Install docker
285286
###
286-
# hadolint ignore=DL3059
287-
RUN curl -sSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
288287
# hadolint ignore=DL3008,DL3059
289-
RUN add-apt-repository -y \
290-
"deb [arch=$(dpkg --print-architecture)] https://download.docker.com/linux/ubuntu \
291-
$(lsb_release -cs) \
292-
stable" \
288+
RUN mkdir -p /etc/apt/keyrings \
289+
&& curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg \
290+
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu noble stable" \
291+
> /etc/apt/sources.list.d/docker.list \
293292
&& apt-get -q update && apt-get -q install --no-install-recommends -y docker-ce docker-compose-plugin \
294293
&& apt-get clean \
295294
&& rm -rf /var/lib/apt/lists/*
@@ -332,12 +331,11 @@ RUN apt-get -q update && apt-get -q install --no-install-recommends -y \
332331
# astroid and pylint go hand-in-hand. Upgrade both at the same time.
333332
######
334333
#ARG PY3_ANSIBLE_VERSION=7.5.0
335-
ARG PY3_ANSIBLELINT_VERSION=25.1.2
336-
ARG PY3_ASTROID_VERSION=2.15.6
337-
ARG PY3_CODESPELL_VERSION=2.4.1
334+
ARG PY3_ANSIBLELINT_VERSION=26.3.2
335+
ARG PY3_CODESPELL_VERSION=2.4.2
338336
ARG PY3_DETECT_SECRETS=1.5.0
339-
ARG PY3_PYLINT_VERSION=2.17.5
340-
ARG PY3_YAMLLINT_VERSION=1.35.1
337+
ARG PY3_PYLINT_VERSION=4.0.5
338+
ARG PY3_YAMLLINT_VERSION=1.38.0
341339
# hadolint ignore=DL3008
342340
RUN apt-get -q update && apt-get -q install --no-install-recommends -y \
343341
python3 \
@@ -361,24 +359,23 @@ RUN apt-get -q update && apt-get -q install --no-install-recommends -y \
361359
&& curl -sSL https://bootstrap.pypa.io/get-pip.py -o /tmp/get-pip.py \
362360
&& python3 /tmp/get-pip.py \
363361
&& rm /usr/local/bin/pip /tmp/get-pip.py \
364-
&& pip3 install --no-cache-dir -v \
362+
&& pip3 install --no-cache-dir --break-system-packages -v \
365363
ansible-lint==$PY3_ANSIBLELINT_VERSION \
366-
astroid==$PY3_ASTROID_VERSION \
367364
codespell==$PY3_CODESPELL_VERSION \
368365
detect-secrets==$PY3_DETECT_SECRETS \
369366
pylint==$PY3_PYLINT_VERSION \
370367
yamllint==$PY3_YAMLLINT_VERSION \
371-
&& rm -rf /root/.cache \
368+
&& rm -rf /root/.cache /root/.config /root/.local \
372369
&& mv /usr/local/bin/pylint /usr/local/bin/pylint3 \
373370
&& ln -s /usr/local/bin/pylint3 /usr/local/bin/pylint \
374371
&& ln -s /usr/local/bin/pip3 /usr/local/bin/pip
375372

376373
####
377374
# Install ruby and associated bits
378375
###
379-
ARG RUBY_BUNDLER_VERSION=2.5.23
376+
ARG RUBY_BUNDLER_VERSION=4.0.8
380377
ARG RUBY_RAKE_VERSION=13.2.1
381-
ARG RUBY_RUBOCOP_VERSION=1.71.2
378+
ARG RUBY_RUBOCOP_VERSION=1.86.0
382379
# hadolint ignore=DL3008
383380
RUN echo 'gem: --no-rdoc --no-ri' >> /root/.gemrc \
384381
&& apt-get -q update && apt-get -q install --no-install-recommends -y \
@@ -389,7 +386,7 @@ RUN echo 'gem: --no-rdoc --no-ri' >> /root/.gemrc \
389386
&& gem install bundler -v $RUBY_BUNDLER_VERSION \
390387
&& gem install rake -v $RUBY_RAKE_VERSION \
391388
&& gem install rubocop -v $RUBY_RUBOCOP_VERSION \
392-
&& rm -rf /root/.gem
389+
&& rm -rf /root/.gem /root/.config /root/.local
393390
# set some reasonable defaults for ruby
394391
# user's can always override these as needed
395392
ENV PATH=${PATH}:/var/tmp/.bundler-gems/bin
@@ -399,22 +396,22 @@ ENV BUNDLE_PATH=/var/tmp/.bundler-gems
399396
# Install npm and JSHint
400397
###
401398
ARG JSHINT_VERSION=2.13.6
402-
ARG MARKDOWNLINTCLI_VERSION=0.44.0
403-
ARG JSONLINT_VERSION=1.6.3
399+
ARG MARKDOWNLINTCLI_VERSION=0.48.0
400+
ARG JSONLINT_VERSION=17.0.1
404401
# hadolint ignore=DL3008
405402
RUN curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key \
406403
| gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \
407-
&& echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" \
404+
&& echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_24.x nodistro main" \
408405
> /etc/apt/sources.list.d/nodesource.list \
409406
&& apt-get -q update \
410407
&& apt-get -q install --no-install-recommends -y nodejs \
411408
&& apt-get clean \
412409
&& rm -rf /var/lib/apt/lists/* \
413410
&& npm install -g \
414411
jshint@$JSHINT_VERSION \
415-
jsonlint@$JSONLINT_VERSION \
416-
markdownlint-cli@0$MARKDOWNLINTCLI_VERSION \
417-
&& rm -rf /root/.npm
412+
@prantlf/jsonlint@$JSONLINT_VERSION \
413+
markdownlint-cli@$MARKDOWNLINTCLI_VERSION \
414+
&& rm -rf /root/.npm /root/.config /root/.local
418415

419416
#####
420417
# Now all the stuff that was built in parallel

0 commit comments

Comments
 (0)