-
Notifications
You must be signed in to change notification settings - Fork 87
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
[WFMP-183] Check if podman exists and use that first, otherwise u… #286
Conversation
It would be even better if the actual executable name could be provided as a parameter on the command line, however, I consider this to be better than the current state. |
I think we could do something like |
0423384
to
e701789
Compare
There should also be updates to the documentation, in many places it implies that docker is the binary that will be used https://github.com/wildfly/wildfly-maven-plugin/search?q=docker |
@vsalbaba what would be the name to use to categorise both |
We can't change the |
I would go with "container engine". The operations related to the image are executing using a |
There is also a hardcoded mention at Lines 45 to 50 in e11d209
|
Thank you. Just fixed that. |
I am considering that changing the default from Additionally, I am considering the option of allowing the tests to run with both engines. By using |
I think this makes sense. I'll update the PR once I get a chance. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM outside of the name of the sysprop
if (dockerBinary == null) { | ||
try { | ||
if (ExecUtil.execSilentWithTimeout(Duration.ofSeconds(3), "podman", "-v")) { | ||
dockerBinary = "podman"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we use podman
first, maybe we should add a INFO
log about the actual used binary?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do think we should use docker first, then podman to keep the current behavior. I also think it does likely make sense to log the binary being used so the user knows.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, wait that is already being done :)
getLog().info(format("Building application image %s using %s.", image, this.image.getBinary()));
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jamezp that's a good point. And docker
remains the most popular binary to build image.
with the `<image><docker-binary>` element to use another binary such as `podman`. | ||
The operations related to the image are executing using a Docker binary. By default, there is an attempt to determine if | ||
`podman` is installed. If not, `docker` is used. This can be explicitly set with the `<image><docker-binary>` element. | ||
It can also be overridden with the `wildfly.image.dockerBinary` property. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the name of the sys prop is now wildfly.image.binary
*/ | ||
protected String dockerBinary = "docker"; | ||
private String dockerBinary; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's find better name even for internals, something like containerTool
, containerBinary
, podBinary
, imageTool
etc. Ideas?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1, that is what I'm doing. I'm just using binary
in the ApplicationImageInfo
as it is typically referred to as "image" so "binary" just seemed to make sense.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FWIW this property cannot be changed as it results in the configuration parameter.
<image>
<docker-binary>docker</docker-binary>
</image>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gotcha, oh well...
… is insalled first, then revert to using docker. Signed-off-by: James R. Perkins <[email protected]>
308df8a
to
2a92872
Compare
…se docker.
https://issues.redhat.com/browse/WFMP-183