[7.17][build/docker] Upgrade Ubuntu to 24.04 (#222244) (#225106)

Backports #222244 

20.04 is at end of standard support;
https://ubuntu.com/about/release-cycle
This commit is contained in:
Jon 2025-06-24 14:59:59 -05:00 committed by GitHub
parent 9403c3b695
commit f95a8cfc4a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 2 deletions

View file

@ -38,7 +38,7 @@ export async function runDockerGenerator(
}
) {
let baseOSImage = '';
if (flags.ubuntu) baseOSImage = 'ubuntu:20.04';
if (flags.ubuntu) baseOSImage = 'ubuntu:24.04';
if (flags.ubi) baseOSImage = 'redhat/ubi9-minimal:latest';
let imageFlavor = '';

View file

@ -134,8 +134,10 @@ RUN chmod g+ws /usr/share/kibana && \
# Remove the suid bit everywhere to mitigate "Stack Clash"
RUN find / -xdev -perm -4000 -exec chmod u-s {} +
{{! Ubuntu 24 containers include ubuntu:1000:1000 as part of a non-root standardization effort }}
{{! Remove ubuntu to maintain the expected kibana user definition }}
# Provide a non-root user to run the process.
RUN groupadd --gid 1000 kibana && \
RUN {{#ubuntu}}userdel -r ubuntu && {{/ubuntu}}groupadd --gid 1000 kibana && \
useradd --uid 1000 --gid 1000 -G 0 \
--home-dir /usr/share/kibana --no-create-home \
kibana