-
Notifications
You must be signed in to change notification settings - Fork 40.7k
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
Document how to get socket location for image building configuration with podman #34435
Comments
On my system, an env variable |
There is something special about that variable: # In terminal
echo ${UID}
1000 but I mean that it's possible to come up with some workarounds, but it would be much better if Spring Boot plugin could auto-detect PodMan. |
Huh, you're right. It's not shown in |
I think it's set in shell(in bash or zsh for example) - not globally. |
With podman installed, you can run the command That's enough for Spring Boot to use podman for downloading the builder and run images, as well as any configured buildpack images, since the Boot plugins will honor the @lazystone Does this technique suit your needs? |
Ok, that's way better than mine approach. But what would be a downside to do following by default inside the plugin? val dockerHost = System.getenv("DOCKER_HOST")
if (dockerHost != null) {
docker {
host.set(dockerHost)
bindHostToBuilder.set(true)
}
} I guess if |
That's not necessarily true. In the minikube example, it is necessary to set the address of the Docker host as a remote address (not a socket), but I think it would be good to add a note about the |
I understand. The only problem as I see it: That could be not a problem in Spring Boot gradle/maven plugin per se, but in whatever library is used for docker integration. My point is that But I don't insist - I can live with that workaround :) |
When discussing the idea of testing for fallback connections to a Docker-compatible daemon, we should also consider the Colima project, which provides another alternative similar in some ways to podman. Colima does not provide a CLI, but it's expected that the Setting the |
At the moment current documentation recommends this approach to configure PodMan:
Where
1000
is anuid
of a user, which is usually a1000
, but might be different in some cases.So, more generic approach to configure PodMan(in theory it's also compatible with Docker) would be:
Which is ugly. It would be nice to move this logic inside of Spring Boot Gradle(and probably maven) plugins to eliminate that boilerplate from configs.
The text was updated successfully, but these errors were encountered: