Dockerhub automated sucessfully built with errors !?

Hi,

My dockerhub repository arnaudeprez/karaf build different version of karaf (2, 3 and 4). It works fine for 2 and 4 but not for 3.
I’ve also tested to build the image locally and it works fine on my laptop but not with the automated build.

Here is the logs on my last automated build :
—> 684b56ba4274
Step 3 : RUN wget http://archive.apache.org/dist/karaf/$KARAF_VERSION/apache-karaf-$KARAF_VERSION.tar.gz; tar -xzf apache-karaf-$KARAF_VERSION.tar.gz -C /opt; rm apache-karaf-$KARAF_VERSION.tar.gz; ln -s /opt/apache-karaf-$KARAF_VERSION /opt/karaf
e[91m–2015-10-09 10:10:40-- http://archive.apache.org/dist/karaf/3.0.5/apache-karaf-3.0.5.tar.gz
e[0m
e[91mResolving archive.apache.org (archive.apache.org)… e[0m
e[91m140.211.11.131, 192.87.106.229, 2001:610:1:80bc:192:87:106:229e[0m
e[91m
Connecting to archive.apache.org (archive.apache.org)|140.211.11.131|:80… e[0m
e[91mconnected.
e[0m
e[91mHTTP request sent, awaiting response… e[0m
e[91m404 Not Found
e[0m
e[91m2015-10-09 10:10:41 ERROR 404: Not Found.

e[0m
e[91mtar (child): apache-karaf-3.0.5.tar.gz: Cannot opene[0m
e[91m: No such file or directory
tar (child): Error is not recoverable: exiting now
e[0m
e[91mtar: Child returned status 2
e[0m
e[91mtar: Error is not recoverable: exiting now
e[0m
e[91mrm: cannot remove ‘apache-karaf-3.0.5.tar.gz’e[0m
e[91m: No such file or directory
e[0m

But at the end, the build is success : Successfully built 8985b1244a41

So there are 2 points here :

  1. Why the build doesn’t work in dockerhub ?
  2. If it doesn’t work, it shouldn’t be sucessfully built.

Have you tried this build locally? I did and it fails in the same way. Not all operational errors will cause a build to fail. It depends on the error code of the process executed. Anyway, you’ll need to fix your build locally before it’ll work on Dockerhub.

Thanks for reaching out :slight_smile:

Actually, sometimes it’s working sometimes not :frowning:

Ok now it’s working.
I think the build status shouldn’t be in done when an error occurs, should be ?