From 15d67e9bdddf6ec8c3c8ec7b296460111fc21594 Mon Sep 17 00:00:00 2001 From: vinit-chauhan Date: Sun, 22 Sep 2024 14:37:37 -0400 Subject: [PATCH 1/4] Replace Ubuntu 20.04 with 22.04 for Docker base images --- CHANGELOG.next.asciidoc | 1 + dev-tools/packaging/packages.yml | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.next.asciidoc b/CHANGELOG.next.asciidoc index a3e1db2095f..68fac000437 100644 --- a/CHANGELOG.next.asciidoc +++ b/CHANGELOG.next.asciidoc @@ -226,6 +226,7 @@ https://github.com/elastic/beats/compare/v8.8.1\...main[Check the HEAD diff] - The environment variable `BEATS_ADD_CLOUD_METADATA_PROVIDERS` overrides configured/default `add_cloud_metadata` providers {pull}38669[38669] - 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. +- Replace Ubuntu 20.04 with 22.04 for Docker base images {issue}40743[40743] *Auditbeat* diff --git a/dev-tools/packaging/packages.yml b/dev-tools/packaging/packages.yml index 8c22acc9dba..66a5ddef16e 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:22.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:22.04' buildFrom: '--platform=linux/arm64 cgr.dev/chainguard/wolfi-base' - &docker_ubi_spec From 84825220ab0f6090c65d9921bfb5b862ab45c07f Mon Sep 17 00:00:00 2001 From: vinit-chauhan Date: Sun, 22 Sep 2024 14:48:25 -0400 Subject: [PATCH 2/4] Added link to pull request in CHANGELOG.next.asciidoc --- CHANGELOG.next.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.next.asciidoc b/CHANGELOG.next.asciidoc index 68fac000437..fed285e5a2e 100644 --- a/CHANGELOG.next.asciidoc +++ b/CHANGELOG.next.asciidoc @@ -226,7 +226,7 @@ https://github.com/elastic/beats/compare/v8.8.1\...main[Check the HEAD diff] - The environment variable `BEATS_ADD_CLOUD_METADATA_PROVIDERS` overrides configured/default `add_cloud_metadata` providers {pull}38669[38669] - 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. -- Replace Ubuntu 20.04 with 22.04 for Docker base images {issue}40743[40743] +- Replace Ubuntu 20.04 with 22.04 for Docker base images {issue}40743[40743] {pull}40942[40942] *Auditbeat* From d1a0af8dd7d69020f8752461c5f9599f9c0603cd Mon Sep 17 00:00:00 2001 From: Vinit Chauhan Date: Tue, 1 Oct 2024 13:57:12 -0400 Subject: [PATCH 3/4] update to ubuntu:24.04 Co-authored-by: Julien Lind --- CHANGELOG.next.asciidoc | 2 +- dev-tools/packaging/packages.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.next.asciidoc b/CHANGELOG.next.asciidoc index 03525c50222..cb2450272b4 100644 --- a/CHANGELOG.next.asciidoc +++ b/CHANGELOG.next.asciidoc @@ -227,7 +227,7 @@ 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 22.04 for Docker base images {issue}40743[40743] {pull}40942[40942] +- 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 66a5ddef16e..1391368cf0b 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:22.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:22.04' + from: '--platform=linux/arm64 ubuntu:24.04' buildFrom: '--platform=linux/arm64 cgr.dev/chainguard/wolfi-base' - &docker_ubi_spec From ce68c08514f3eec998e979705b126ce646287662 Mon Sep 17 00:00:00 2001 From: vinit-chauhan Date: Wed, 2 Oct 2024 15:18:53 -0400 Subject: [PATCH 4/4] remove default ubuntu user in 24.04 while generating container. --- dev-tools/packaging/templates/docker/Dockerfile.tmpl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dev-tools/packaging/templates/docker/Dockerfile.tmpl b/dev-tools/packaging/templates/docker/Dockerfile.tmpl index f8848640079..85904ffe5dd 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 && \