From b7ef2b091d949319a7d298b1fe85f750a749dd83 Mon Sep 17 00:00:00 2001 From: Jaime Soriano Pastor Date: Mon, 17 Aug 2020 11:33:32 +0200 Subject: [PATCH] Install jq in ubi image for agent --- .../packaging/templates/docker/Dockerfile.elastic-agent.tmpl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dev-tools/packaging/templates/docker/Dockerfile.elastic-agent.tmpl b/dev-tools/packaging/templates/docker/Dockerfile.elastic-agent.tmpl index cc9f4ce7f4e..a7242baa73b 100644 --- a/dev-tools/packaging/templates/docker/Dockerfile.elastic-agent.tmpl +++ b/dev-tools/packaging/templates/docker/Dockerfile.elastic-agent.tmpl @@ -24,8 +24,9 @@ RUN mkdir -p {{ $beatHome }}/data {{ $beatHome }}/logs && \ FROM {{ .from }} {{- if contains .from "ubi-minimal" }} -# TODO Install or replace jq RUN for iter in {1..10}; do microdnf update -y && microdnf install -y shadow-utils && microdnf clean all && exit_code=0 && break || exit_code=$? && echo "microdnf error: retry $iter in 10s" && sleep 10; done; (exit $exit_code) +RUN curl -L https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux64 -o /usr/local/bin/jq && \ + chmod +x /usr/local/bin/jq {{- else }} # Installing jq needs to be installed after epel-release and cannot be in the same yum install command. RUN for iter in {1..10}; do yum update --setopt=tsflags=nodocs -y && yum install --setopt=tsflags=nodocs -y epel-release && yum clean all && exit_code=0 && break || exit_code=$? && echo "yum error: retry $iter in 10s" && sleep 10; done; (exit $exit_code)