Skip to content

Commit f95a8cf

Browse files
authored
[7.17][build/docker] Upgrade Ubuntu to 24.04 (elastic#222244) (elastic#225106)
Backports elastic#222244 20.04 is at end of standard support; https://ubuntu.com/about/release-cycle
1 parent 9403c3b commit f95a8cf

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/dev/build/tasks/os_packages/docker_generator/run.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export async function runDockerGenerator(
3838
}
3939
) {
4040
let baseOSImage = '';
41-
if (flags.ubuntu) baseOSImage = 'ubuntu:20.04';
41+
if (flags.ubuntu) baseOSImage = 'ubuntu:24.04';
4242
if (flags.ubi) baseOSImage = 'redhat/ubi9-minimal:latest';
4343

4444
let imageFlavor = '';

src/dev/build/tasks/os_packages/docker_generator/templates/base/Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,10 @@ RUN chmod g+ws /usr/share/kibana && \
134134
# Remove the suid bit everywhere to mitigate "Stack Clash"
135135
RUN find / -xdev -perm -4000 -exec chmod u-s {} +
136136

137+
{{! Ubuntu 24 containers include ubuntu:1000:1000 as part of a non-root standardization effort }}
138+
{{! Remove ubuntu to maintain the expected kibana user definition }}
137139
# Provide a non-root user to run the process.
138-
RUN groupadd --gid 1000 kibana && \
140+
RUN {{#ubuntu}}userdel -r ubuntu && {{/ubuntu}}groupadd --gid 1000 kibana && \
139141
useradd --uid 1000 --gid 1000 -G 0 \
140142
--home-dir /usr/share/kibana --no-create-home \
141143
kibana

0 commit comments

Comments
 (0)