-
Notifications
You must be signed in to change notification settings - Fork 697
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
--as-dockerfile doesn't read builder image labels labels #973
Comments
Looking into the source at source-to-image/pkg/build/strategies/dockerfile/dockerfile.go Lines 415 to 423 in 3bdb78d
it's really only about the options In fact, it would be super awesome if this detection could be done automatically as all information is already there. No need to bug the user to know where within the builder image the s2i directory is located. |
The challenge is how to discover the information. The intent of the --as-dockerfile invocation is that we have no reliance on any specific tool/library that would be used to inspect the image in question, thus we can't look at the labels to determine this information. (If we assume the presence of a docker daemon and use that to inspect the image, we might as well just run s2i in the traditional mode where it builds the whole image for you). |
I do get the "no reliance on any specific tool" but not on the library part. We could easily re-use
We definitely can't (or do not want) to assume the presence of a docker daemon, especially on OpenShift 4.x — but it's also true for some GKE cluster version where docker is not even there anymore (using @bparees related to #966 (especially the latest comments), I am guessing OpenShift 4 is either affected by that issue or (most likely) does the remote inspect on its own, right ? If it's true, I feel it would be beneficial to have this part in the repository so |
openshift4 does its own image inspect prior to invoking the s2i bits.
it could be done, yes. |
Issues go stale after 90d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle stale |
Stale issues rot after 30d of inactivity. Mark the issue as fresh by commenting If this issue is safe to close now please do so with /lifecycle rotten |
/lifecycle frozen |
May I point out that all S2I related ClusterTasks that come with OpenShift Pipelines use As long as this bug persists you (I mean the Red Hat engineers) will not be able to change the location of the S2I machinery within any S2I base image (as has been done with the Java S2I base image some time in the past). |
We've hit this (again) in three customer cases over the last couple of weeks; another relevant label this time is For Asides from fixing this in s2i at a code level (appreciate that this is not straightforward), it would be a good idea to note that the labels don't do anything in |
It seems that
s2i build --as-dockerfile
doesn't read the builder image labels when generating theDockerfile
, especially theio.openshift.s2i.*
ones.As an example, see this gist. The image use in there
registry.access.redhat.com/redhat-openjdk-18/openjdk18-openshift
.When trying to build the generated
Dockerfile
from this builder, it fails as it is looking at it tries to execute aRUN
on/usr/libexec/s2i/assemble
, which doesn't exists in that image.Related to #966 (comment).
cc @siamaksade @rhuss
The text was updated successfully, but these errors were encountered: