lordgamez commented on a change in pull request #959:
URL: https://github.com/apache/nifi-minifi-cpp/pull/959#discussion_r543375546
##########
File path: docker/fedora/Dockerfile
##########
@@ -27,7 +27,11 @@ ARG MINIFI_VERSION
ENV MINIFI_BASE_DIR /opt/minifi
ENV MINIFI_HOME $MINIFI_BASE_DIR/nifi-minifi-cpp-$MINIFI_VERSION
-RUN yum -y install java-1.8.0-openjdk java-1.8.0-openjdk-devel flex bison make
patch sudo git which maven libtool autoconf automake
+RUN echo "fastestmirror=True" | tee -a /etc/dnf/dnf.conf
+RUN for iter in {1..10}; do yum update -y && \
+ yum -y install java-1.8.0-openjdk java-1.8.0-openjdk-devel flex bison make
patch sudo git which maven libtool autoconf automake && \
+ yum clean all && exit_code=0 && break || exit_code=$? && echo "yum error:
retry $iter in 10s" && sleep 10; done; \
+ (exit $exit_code)
Review comment:
Yes, exactly, setting the last exit code, which is then checked by the
docker build.
##########
File path: docker/fedora/Dockerfile
##########
@@ -27,7 +27,11 @@ ARG MINIFI_VERSION
ENV MINIFI_BASE_DIR /opt/minifi
ENV MINIFI_HOME $MINIFI_BASE_DIR/nifi-minifi-cpp-$MINIFI_VERSION
-RUN yum -y install java-1.8.0-openjdk java-1.8.0-openjdk-devel flex bison make
patch sudo git which maven libtool autoconf automake
+RUN echo "fastestmirror=True" | tee -a /etc/dnf/dnf.conf
+RUN for iter in {1..10}; do yum update -y && \
+ yum -y install java-1.8.0-openjdk java-1.8.0-openjdk-devel flex bison make
patch sudo git which maven libtool autoconf automake && \
+ yum clean all && exit_code=0 && break || exit_code=$? && echo "yum error:
retry $iter in 10s" && sleep 10; done; \
Review comment:
The original issue:
`Curl error (28): Timeout was reached for
https://mirrors.fedoraproject.org/metalink?repo=fedora-29&arch=x86_64
[Connection timed out after 30000 milliseconds]`
I'm not sure what the root cause of this, maybe something in the environment
is not set up yet, so we just wait 10 seconds between tries, to wait for the
environment setup to complete. The issue was quite common and disappeared after
this fix. The way it is done comes from the [ElesticSearch
repository](https://github.com/elastic/elasticsearch/blob/6.8/distribution/docker/src/docker/Dockerfile).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]