I have been working on a Quarkus Docker Java client for one of my projects. Since it's separate, I have decided to split it and make it into its own extension.
This extension adds the ability to configure and inject DockerClient from Docker Java Client. Also, if no host is configured, the host is configured automatically depending on the user's OS. If the user is using Unix, the unix:///var/run/docker.sock will be used if the user is on Windows, then npipe:////./pipe/docker_engine is used.
You can use the extension like this:
@Inject
DockerClient dockerClient;
// Use the client
dockerClient.pingCmd().exec();
# Production client configuration
quarkus.docker."production".docker-host=tcp://prod-host:2375
quarkus.docker."production".enabled=true
Currently, the extension doesn't support native mode as there are problems with using sockets in the library default http client. In the future, I think there could be a custom VertX implementation of this client, similar to how Fabric8 does it. The extension also provides a readiness health check to see if all clients started properly.
Description
I have been working on a Quarkus Docker Java client for one of my projects. Since it's separate, I have decided to split it and make it into its own extension.
This extension adds the ability to configure and inject DockerClient from Docker Java Client. Also, if no host is configured, the host is configured automatically depending on the user's OS. If the user is using Unix, the
unix:///var/run/docker.sock
will be used if the user is on Windows, thennpipe:////./pipe/docker_engine
is used.You can use the extension like this:
Or you can create a named client like this:
With configuration being like this:
Currently, the extension doesn't support native mode as there are problems with using sockets in the library default http client. In the future, I think there could be a custom VertX implementation of this client, similar to how Fabric8 does it. The extension also provides a readiness health check to see if all clients started properly.
Repository name
quarkus-docker-client
Short description
Docker Java client integration for Quarkus
Repository Homepage URL
https://github.com/zZHorizonZz/quarkus-docker-client
Repository Topics
Team Members
Additional context
No response