@@ -43,7 +43,8 @@ ENV ELASTIC_AGENT_IMAGE_VARIANT={{.Variant}}
4343ENV BEAT_SETUID_AS={{ .user }}
4444
4545{{- if contains .from "ubi-minimal" }}
46- RUN for iter in {1..10}; do microdnf update -y && microdnf install -y shadow-utils jq && microdnf clean all && exit_code=0 && break || exit_code=$? && echo "microdnf error: retry $iter in 10s" && sleep 10; done; (exit $exit_code)
46+ RUN for iter in {1..10}; do rpm -ivh https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm && microdnf update -y && microdnf install -y shadow-utils jq && microdnf clean all && exit_code=0 && break || exit_code=$? && echo "microdnf error: retry $iter in 10s" && sleep 10; done; (exit $exit_code)
47+ RUN microdnf install -y jq
4748{{- else }}
4849# Installing jq needs to be installed after epel-release and cannot be in the same yum install command.
4950RUN case $(arch) in aarch64) YUM_FLAGS="-x bind-license";; esac; \
@@ -58,7 +59,8 @@ RUN case $(arch) in aarch64) YUM_FLAGS="-x bind-license";; esac; \
5859 (exit $exit_code)
5960{{- end }}
6061
61- {{- if (and (eq .Variant "complete") (not (contains .from "ubi-minimal"))) }}
62+ {{- if (eq .Variant "complete") }}
63+ {{- if (not (contains .from "ubi-minimal")) }}
6264RUN for iter in {1..10}; do \
6365 yum -y install atk cups gtk gdk xrandr pango libXcomposite libXcursor libXdamage \
6466 libXext libXi libXtst cups-libs libXScrnSaver libXrandr GConf2 \
@@ -68,6 +70,16 @@ RUN for iter in {1..10}; do \
6870 exit_code=0 && break || exit_code=$? && echo "yum error: retry $iter in 10s" && sleep 10; \
6971 done; \
7072 (exit $exit_code)
73+ {{- else }}
74+ RUN for iter in {1..10}; do \
75+ microdnf -y install atk cups xrandr pango libXcomposite libXcursor libXdamage \
76+ libXext libXi libXtst cups-libs libXScrnSaver libXrandr GConf2 \
77+ alsa-lib atk gtk3 findutils tar xz && \
78+ microdnf clean all && \
79+ exit_code=0 && break || exit_code=$? && echo "microdnf error: retry $iter in 10s" && sleep 10; \
80+ done; \
81+ (exit $exit_code)
82+ {{- end }}
7183ENV NODE_PATH={{ $beatHome }}/.node
7284RUN echo \
7385 $NODE_PATH \
@@ -156,7 +168,7 @@ RUN mkdir /app
156168{{- else }}
157169RUN groupadd --gid 1000 {{ .BeatName }}
158170RUN useradd -M --uid 1000 --gid 1000 --groups 0 --home {{ $beatHome }} {{ .user }}
159- {{- if (and ( eq .Variant "complete") (not (contains .from "ubi-minimal"))) }}
171+ {{- if (eq .Variant "complete") }}
160172RUN chown {{ .user }} $NODE_PATH
161173{{- end }}
162174{{- if contains .image_name "-cloud" }}
@@ -167,7 +179,7 @@ RUN chown {{ .user }} /app
167179{{- end }}
168180USER {{ .user }}
169181
170- {{- if (and ( eq .Variant "complete") (not (contains .from "ubi-minimal")) ) }}
182+ {{- if (eq .Variant "complete") }}
171183# Setup synthetics env vars
172184ENV ELASTIC_SYNTHETICS_CAPABLE=true
173185ENV SUITES_DIR={{ $beatHome }}/suites
0 commit comments