ADD Dockerfile reference is not validating HTTP status code in buildah und subsequentially in OpenShift Container Platform 4
Issue
-
During a OpenShift build we are executing a step like shown below with the
ADD
reference. If the webserver replies with a 404 error, the error is writen to theapp.jar
instead forcing the build to fail.STEP 8/12: ADD https://webserver.example.com/app.jar /deploy/app.jar time="2022-06-23T15:01:58Z" level=warning msg="Adding metacopy option, configured globally" --> fdbeb7ba0bf
-
buildah
does not respect the HTTP status code returned when usingADD
Dockerfile reference. Instead a file with the name is added with the HTTP response code included, showing the 404 error.
Environment
- Red Hat OpenShift Container Platform (RHOCP) 4
buildah
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.