-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[RFE]Make docker-compose work with rootless podman #9169
Comments
as you can see, the network stack is problematic ... it has not specifically been discussed. I'm not terribly versed on the cni usage for rootless but i'll ask around and see what's involved. |
This is definitely possible. I am currently working on #8910. With the changes there it should be a very trivial change to support network connect/disconnect for rootless. |
I think there's some mental (and technical) gap between supporting docker-compose's configuration format file and Kubernetes's YAML configuration format file. Podman supports latter with generate kube/play kube commands and there's a separate app (podman-compose) which pretends to support the former. However, currently this fact misleads a little because you do not know which way to go |
Podman provides full support for the native Docker-compose app now, so podman-compose is no longer the only option for Compose support. I agree that we could clarify this a bit more, but Kube YAML and Compose support serve separate purposes and are quite distinct. |
@siretart How do you start your podman.socket service as a regular user at unix:/run/user/1000/podman/podman.sock ? |
Using systemd:
|
@siretart @zygous or anybody else who is interested. |
@Luap99 that PR doesn't apply to podman 3.0.1. Did you work on latest master? -- if so, any chance that you could provide a version that worked with 3.0.1 to minimize the changes in my test environment? Otherwise I'd need to package latest HEAD, which I don't have the capacity to keep up with. |
I guess I need to wait for an update for this to be implemented? When running docker-compose in a rootless mode, it fails due to a network error, as by default it uses default cni called 'username_default'. While, from what I understand, in rootless mode, only 'slirp4netns' is supported?
If I run the podman command manually (with the default/unspecified network), it works fine:
|
@siretart I can make you a version based on 3.0.1. |
Can't we just use the binaries from the CI job? https://github.com/containers/podman/pull/9423/checks?check_run_id=2167287171 |
@yajo That should work too. I wasn't aware that binaries are available for each PR. |
@Luap99 sorry for the delay, and thanks for the backport in the branch. I've captured that backport in a patch and pushed the result here: https://salsa.debian.org/debian/libpod/-/tree/master.rootless.compose With that package built and installed, I tried the initial test-case:
This process hung for about a minute and then produced the error above. I suspect this is because After trying a couple of times, I got to this result:
For reference, I've been testing with the compose file from here: https://github.com/docker/awesome-compose/tree/master/gitea-postgres. I'll have to try with other compose files, this issue may (or may not) appear with simpler setups. But I'd say this patch is progress! :-) |
@siretart Thanks for the testing. The network not found error is an issue which I fixed for v3.1.0. This is a flake you may not see this every time depending on the system. Version 3.1.0 will be released very soon. I recommend testing again when you updated to 3.1.0 there are more network related fixes in there. |
Hi everyone, I've been testing rootless docker-compose and it's been working great on Fedora 33... except that it seems containers lose DNS resolution to the outside world (there are no issues accessing plain IP addresses). DNS resolution within networks still works, but has a 10 to 15 second delay. This happens with both docker-compose and the CLI (when connecting the containers to a network), so I used the CLI in my example for a more direct comparison. With podman 3.0.1, this is what I get:
With the latest static build from CI for the PR, this is what I get:
Is there some solution or workaround for this? Does this happen to anyone else? |
@dirextric Yes this problem is known. The workaround is to set the dns search domain to |
@Luap99 Setting the DNS search domain does indeed fix the slow internal resolutions, but it appears the containers still can't resolve to the outside world. Any ideas? |
@dirextric I pushed an update which fixes this. I assume that you only have a local dns server in |
@Luap99 Yes, that is correct. The fix works great, thanks! |
This reverts commit 3c31de3. should use "dns_search: dns.podman" in the override instead containers/podman#9169 (comment)
Hi there, I'm still facing the same problem and wanted to ask, if I'm missing something here. Running: podman --version |
You need version 3.2 (will be released soon). |
Got it. Thanks lot |
Hello, I'm not sure if this is a regression or some configuration related error but I seem to be experiencing the same problem as #9169 (comment), on version 3.2.2 however. Setting the log level of docker-compose to DEBUG reveals stdout getting spammed with Opened a seperate issue: #10857 |
@networkException Please open a new issue with steps to reproduce this. |
I've tried docker-compose with rootless podman, but that doesn't currently work:
What would it take to make network connect work for rootless mode? Is that on the roadmap?
Originally posted by @siretart in #9059 (comment)
The text was updated successfully, but these errors were encountered: