-
-
Notifications
You must be signed in to change notification settings - Fork 511
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
support podman as alternative to docker #336
Comments
UPDATE: it looks like very little effort should be required to work with podman 3+. It is compatible with the docker API, even to the point where you can run native "docker compose". That works as follows:
If you're not using
This listens on However, the
(Aside: the ugly nil pointer dereference is because the sample code uses With
It appears that NewReaper has a hard-coded path to |
Here is a POC patch for that problem:
However, I'm not providing this as a PR because it's still not running under my environment. Note that I'm using Ubuntu 18.04 on the base host. The podman package (3.0.1 from the kubic repo) uses a systemd feature
But there is still an error coming from podman or crun: "must provide at least one stream to attach to"
|
strace shows the HTTP exchanges to podman as:
|
I'll put my 2 cents in: testcontainers/testcontainers-java#2088 describes the direction we should take. TLDR: Testcontainers should continue to use the docker API, and Podman should implement that API. I think the Podman team have done a lot of great work in Podman's support for the Docker API, but evidently this |
Hi, any update on this thread? |
This is the only place I found that "must provide at least one stream to attach to" error mentioned. I fixed it by setting the ErrorStream and OutputStream variables on ContainerRunOptions: pentities.ContainerRunOptions{
Rm: true,
Spec: specGen,
ErrorStream: os.Stdout,
OutputStream: os.Stdout,
}, Maybe this helps. |
I'm working on a PR that also includes the change @paralin mentioned and a few more things e.g. to also run all tests with Podman. There's another PR that already covers the support of the I cannot say how long it will take to stabilize everything but I hope soon ™️ 😄 |
Any progress on this? |
1 similar comment
Any progress on this? |
Hey @altosys it was merged in #414. Not released yet though, although it will come soon |
Yeah I was looking for documentation on how to use testcontainers-go with podman and didn't find any, so I assumed it wasn't quite ready. Do you have a time frame that is more specific than "soon"? It's very hard for me to tell what that means since the discussion here has been quiet since April. |
I'm currently on summer PTO, end of month could be an accurate estimation |
I'll try to also add some docs till then - end of August sounds reasonable to write at least some hints/examples |
After the release of v0.14.0, tc-go experimentally supports Podman, including some docs (https://golang.testcontainers.org/features/using_podman/). So I'd like to send big kudos to @baez90 for this massive contribution. OTOH, I'd like to stand with what @rnorth mentioned in #336 (comment) too: if Podman supports Docker APIs, then it should work with tc-go, which uses Docker APIs. Said that, I think this issue can be closed, and if there is anything else missing, I'd suggest opening separate issues for each missing topic. Big thanks to you all for participating in the community! |
I wondered if you had considered supporting podman for running containers, as an alternative backend to docker?
Using podman (and buildah for creating container images) lets you get rid of the docker daemon entirely.
There is a go API. This does involve running a podman service: but unlike docker, the service runs as your own userid, with no elevated privileges, and can be started and stopped by the user themselves.
The text was updated successfully, but these errors were encountered: