mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 22:57:16 -04:00
[backport 7.x] [Build] On aarch64 docker build, install noarch
version of bind-license first (#12891) (#12900)
Backport PR #12891 to 7.x branch. Original message: On aarch64, yum does not pick the correct 'bind-license' package, this commit installs a specific noarch RPM This commit also adds retry to the yum installs and updates.
This commit is contained in:
parent
4f58cb3bf5
commit
e5e41f85c4
1 changed files with 24 additions and 2 deletions
|
@ -29,8 +29,30 @@ FROM {{ base_image }}
|
||||||
# Install Java and the "which" command, which is needed by Logstash's shell
|
# Install Java and the "which" command, which is needed by Logstash's shell
|
||||||
# scripts.
|
# scripts.
|
||||||
# Minimal distributions also require findutils tar gzip (procps for integration tests)
|
# Minimal distributions also require findutils tar gzip (procps for integration tests)
|
||||||
RUN {{ package_manager }} update -y && {{ package_manager }} install -y procps findutils tar gzip which shadow-utils && \
|
|
||||||
{{ package_manager }} clean all
|
# on aarch64, yum does not pick the right `bind-license` package for some reason
|
||||||
|
# here we install a specific noarch RPM.
|
||||||
|
{% if arch == 'aarch64' -%}
|
||||||
|
RUN for iter in {1..10}; do {{ package_manager }} install -y http://mirror.centos.org/centos/7/updates/x86_64/Packages/bind-license-9.11.4-26.P2.el7_9.5.noarch.rpm && \
|
||||||
|
{{ package_manager }} clean all && \
|
||||||
|
{{ package_manager }} clean metadata && \
|
||||||
|
exit_code=0 && break || exit_code=$? && \
|
||||||
|
echo "packaging error: retry $iter in 10s" && \
|
||||||
|
{{ package_manager }} clean all && \
|
||||||
|
{{ package_manager }} clean metadata && sleep 10; done; \
|
||||||
|
(exit $exit_code)
|
||||||
|
|
||||||
|
{% endif -%}
|
||||||
|
|
||||||
|
RUN for iter in {1..10}; do {{ package_manager }} update -y && \
|
||||||
|
{{ package_manager }} install -y procps findutils tar gzip which shadow-utils && \
|
||||||
|
{{ package_manager }} clean all && \
|
||||||
|
{{ package_manager }} clean metadata && \
|
||||||
|
exit_code=0 && break || exit_code=$? && \
|
||||||
|
echo "packaging error: retry $iter in 10s" && \
|
||||||
|
{{ package_manager }} clean all && \
|
||||||
|
{{ package_manager }} clean metadata && sleep 10; done; \
|
||||||
|
(exit $exit_code)
|
||||||
|
|
||||||
# Provide a non-root user to run the process.
|
# Provide a non-root user to run the process.
|
||||||
RUN groupadd --gid 1000 logstash && \
|
RUN groupadd --gid 1000 logstash && \
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue