-
Notifications
You must be signed in to change notification settings - Fork 535
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
JIB image build is failing if a Dockerfile is located in the root folder of the project. #970
Comments
There's a collision in mode detection here. The Dockerfile in the root directory makes JKube assume we are running in Simple Dockerfile mode. JIB build strategy is not compatible with (any of) the Dockerfile mode(s). I'm not sure what the right approach here can be. Some ideas:
|
My suggestion is avoid failure when possible: if the user is requesting the JIB build strategy, we have to obey and build with JIB even if the Dockerfile is not used. It may be good to add a kind of summary at the end of the build. Something like:
|
Yes, but the user might be assuming that JKube is operationg in Dockerfile mode, and it's not, which will lead them to unexpected (and maybe unpleasant) results. Thus we might want the user to opt-in to said way of working by forcing them to provide an extra-flag. Your proposal aligns with my second suggestion "Additional warning and fall-back to next mode....", but as I say there, I find this very dangerous. We can further discuss this during triage session. |
As agreed during triage meeting:
|
Description
As a user, I would like to use the jib build strategy and not the default docker one. So when I am invoking:
It should use the jib strategy.
However if a Dockerfile is located in the root folder of the project, the error is raised:
Info
Eclipse JKube version : 1.4.0
Maven version (
mvn -v
) : 3.8.1 and 3.6.3Kubernetes / Red Hat OpenShift setup and version : N/A
If it's a bug, how to reproduce :
mvn k8s:build -Djkube.build.strategy=jib
Sample Reproducer Project : https://github.com/parisjug/live-stream-question
The text was updated successfully, but these errors were encountered: