From 4c1489d67c3f6e0903bcfe6fb05cbdc5ab54d979 Mon Sep 17 00:00:00 2001 From: Vinit Chauhan Date: Tue, 8 Oct 2024 02:58:38 -0400 Subject: [PATCH] Update Ubuntu 20.04 with 24.04 for Docker base images (#40942) * Replace Ubuntu 20.04 with 22.04 for Docker base images * Added link to pull request in CHANGELOG.next.asciidoc * update to ubuntu:24.04 Co-authored-by: Julien Lind * remove default ubuntu user in 24.04 while generating container. --------- Co-authored-by: Mauri de Souza Meneguzzo Co-authored-by: Julien Lind Co-authored-by: Andrzej Stencel --- CHANGELOG.next.asciidoc | 2 ++ dev-tools/packaging/packages.yml | 4 ++-- dev-tools/packaging/templates/docker/Dockerfile.tmpl | 2 ++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.next.asciidoc b/CHANGELOG.next.asciidoc index 395dd313dec2..22f9c0701bdb 100644 --- a/CHANGELOG.next.asciidoc +++ b/CHANGELOG.next.asciidoc @@ -233,6 +233,8 @@ https://github.com/elastic/beats/compare/v8.8.1\...main[Check the HEAD diff] - When running under Elastic-Agent Kafka output allows dynamic topic in `topic` field {pull}40415[40415] - The script processor has a new configuration option that only uses the cached javascript sessions and prevents the creation of new javascript sessions. - Update to Go 1.22.7. {pull}41018[41018] +- Replace Ubuntu 20.04 with 24.04 for Docker base images {issue}40743[40743] {pull}40942[40942] + *Auditbeat* diff --git a/dev-tools/packaging/packages.yml b/dev-tools/packaging/packages.yml index 8c22acc9dba6..1391368cf0bd 100644 --- a/dev-tools/packaging/packages.yml +++ b/dev-tools/packaging/packages.yml @@ -159,7 +159,7 @@ shared: - &docker_spec <<: *binary_spec extra_vars: - from: '--platform=linux/amd64 ubuntu:20.04' + from: '--platform=linux/amd64 ubuntu:24.04' buildFrom: '--platform=linux/amd64 cgr.dev/chainguard/wolfi-base' user: '{{ .BeatName }}' linux_capabilities: '' @@ -172,7 +172,7 @@ shared: - &docker_arm_spec <<: *docker_spec extra_vars: - from: '--platform=linux/arm64 ubuntu:20.04' + from: '--platform=linux/arm64 ubuntu:24.04' buildFrom: '--platform=linux/arm64 cgr.dev/chainguard/wolfi-base' - &docker_ubi_spec diff --git a/dev-tools/packaging/templates/docker/Dockerfile.tmpl b/dev-tools/packaging/templates/docker/Dockerfile.tmpl index f8848640079a..85904ffe5dd2 100644 --- a/dev-tools/packaging/templates/docker/Dockerfile.tmpl +++ b/dev-tools/packaging/templates/docker/Dockerfile.tmpl @@ -57,6 +57,8 @@ RUN for iter in {1..10}; do \ {{- end }} {{- if contains .from "ubuntu" }} +RUN touch /var/mail/ubuntu && chown ubuntu /var/mail/ubuntu && userdel -r ubuntu + RUN for iter in {1..10}; do \ apt-get update -y && \ DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends --yes ca-certificates curl gawk libcap2-bin xz-utils && \