Skip to content

Commit

Permalink
Install jq in ubi image for agent
Browse files Browse the repository at this point in the history
  • Loading branch information
jsoriano committed Aug 17, 2020
1 parent f978f4a commit b7ef2b0
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit b7ef2b0

Please sign in to comment.