Skip to content

Commit 81cba7f

Browse files
v1vmergify[bot]
authored andcommitted
docker: use the official Red Hat images (#7817)
(cherry picked from commit 56f5d90) # Conflicts: # dev-tools/packaging/packages.yml # dev-tools/packaging/templates/docker/Dockerfile.elastic-agent.tmpl
1 parent ba9ff49 commit 81cba7f

2 files changed

Lines changed: 21 additions & 1 deletion

File tree

dev-tools/packaging/packages.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -477,6 +477,7 @@ shared:
477477
- &docker_ubuntu_spec
478478
docker_variant: 'basic'
479479
extra_vars:
480+
<<<<<<< HEAD
480481
from: '--platform=linux/amd64 ubuntu:24.04'
481482
- &docker_ubuntu_arm_spec
482483
docker_variant: 'basic'
@@ -487,10 +488,13 @@ shared:
487488
docker_variant: 'ubi'
488489
extra_vars:
489490
from: '--platform=linux/amd64 docker.elastic.co/ubi9/ubi-minimal'
491+
=======
492+
from: '--platform=linux/amd64 redhat/ubi9-minimal'
493+
>>>>>>> 56f5d9053 (docker: use the official Red Hat images (#7817))
490494
- &docker_ubi_arm_spec
491495
docker_variant: 'ubi'
492496
extra_vars:
493-
from: '--platform=linux/arm64 docker.elastic.co/ubi9/ubi-minimal'
497+
from: '--platform=linux/arm64 redhat/ubi9-minimal'
494498

495499
- &docker_wolfi_spec
496500
docker_variant: 'wolfi'

dev-tools/packaging/templates/docker/Dockerfile.elastic-agent.tmpl

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,14 @@ RUN for iter in {1..10}; do \
1717

1818
COPY beat {{ $beatHome }}
1919

20+
{{- if (and (contains .buildFrom "redhat/ubi") (contains .buildFrom "-minimal")) }}
21+
RUN for iter in {1..10}; do \
22+
microdnf update -y && \
23+
microdnf install -y findutils && \
24+
microdnf clean all && \
25+
exit_code=0 && break || exit_code=$? && echo "microdnf error: retry $iter in 10s" && sleep 10; done; (exit $exit_code)
26+
{{- end }}
27+
2028
RUN true && \
2129
# ECE needs to create config here under non-1000 user
2230
chmod 0777 {{ $beatHome}} && \
@@ -71,6 +79,7 @@ FROM {{ .from }}
7179

7280
ENV BEAT_SETUID_AS={{ .user }}
7381

82+
<<<<<<< HEAD
7483
{{- if contains .from "ubi-minimal" }}
7584
RUN for iter in {1..10}; do microdnf update -y && microdnf install -y tar gzip findutils shadow-utils && microdnf clean all && exit_code=0 && break || exit_code=$? && echo "microdnf error: retry $iter in 10s" && sleep 10; done; (exit $exit_code)
7685
{{- end }}
@@ -79,6 +88,9 @@ RUN for iter in {1..10}; do microdnf update -y && microdnf install -y tar gzip f
7988
# Delete the existing "ubuntu" user to prevent conflict with the user that is added later.
8089
# See https://bugs.launchpad.net/cloud-images/+bug/2005129/comments/2.
8190
RUN touch /var/mail/ubuntu && chown ubuntu /var/mail/ubuntu && userdel -r ubuntu
91+
=======
92+
{{- if (and (contains .from "redhat/ubi") (contains .from "-minimal")) }}
93+
>>>>>>> 56f5d9053 (docker: use the official Red Hat images (#7817))
8294
RUN for iter in {1..10}; do \
8395
apt-get update -y && \
8496
DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends --yes ca-certificates curl gawk xz-utils && \
@@ -193,7 +205,11 @@ RUN apk add --no-cache git make python-3.11 py3.11-pip && \
193205
chmod 0755 {{ $beatHome }}/data/elastic-agent-*/components/connectors
194206
{{- end }}
195207

208+
<<<<<<< HEAD
196209
{{- if (and (eq .Variant "complete") (contains .from "ubuntu")) }}
210+
=======
211+
{{- if (and (eq .Variant "complete") (and (contains .from "redhat/ubi") (contains .from "-minimal") )) }}
212+
>>>>>>> 56f5d9053 (docker: use the official Red Hat images (#7817))
197213
USER root
198214
ENV NODE_PATH={{ $beatHome }}/.node
199215
RUN echo \

0 commit comments

Comments
 (0)