-
-
Notifications
You must be signed in to change notification settings - Fork 294
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
[Enhancement]: Extending Testcontainers to support multiple container runtimes (Podman) #876
Comments
Context: might be a pre-requisite: brew update
brew upgrade
# this is because QEMU had a bug since mid december / january that pulled an x86 image on ARM
# this is likely fixed and force a full re-creation
podman machine stop
podman machine rm
podman machine init
podman machine start
All I had to do was: $ echo "ryuk.container.privileged = true" >> $HOME/.testcontainers.properties
$ cat $HOME/.testcontainers.properties
ryuk.container.privileged = true
$ |
I've tried using Testcontainers with Podman via a simple |
The issues are not just related to the tests in this repository. Depending on your Podman environment and configuration, they can happen their as well. |
should this still be opened @HofmeisterAn ? since qemu fixed their image |
I'm not sure, but in my opinion, we should keep the issue open until we have a working GitHub workflow that supports Podman. I haven't recently tested TC for .NET with Podman, I don't know which features are working and which are not. |
i fail to understand the relation between "testcontainer works with podman"✅ versus "adding a github workflow integration feature (to testcontainer withpod man")⚒️ that second one seems like an integration evol one that needs to be created as "proposal" |
I think there are still a few issues that prevent Testcontainers for .NET from working properly with Podman, or at least obstacles. Ideally, this issue addresses the Podman incompatibilities (failing tests) and establishes a proper GH workflow (incl. updating the docs and explain which steps are necessary to set it up). Otherwise, we cannot know which features are working, which are not, and which may break with newer versions. |
/remindme 1year 🙃 (bad joke ok ...) |
To get it working on Fedora 40, I ran the following command Then ran this And everything started working nicely. |
Hi, I'm facing problem when I create network with TC. Steps too reproduce:
Result: Environment: I'm not sure if this is podman or TC issue. Please let me know if I need to make changes. |
apparently the default podman version in my distro is quite old (v3) thx :) |
Problem
Since Testcontainers for Node has done an awesome job supporting multiple container runtimes (not just Docker), it makes perfect sense to continue this great work and look into implementing it for .NET. We can start by collecting a list of tasks, issues or incompabilities that are necessary to support other runtimes as well.
Docker.DotNet
'sExtractArchiveToContainerAsync(string, ContainerPathStatParameters, Stream, CancellationToken)
throwsSystem.Net.Sockets.SocketException : Connection reset by peer
.export TESTCONTAINERS_DOCKER_SOCKET_OVERRIDE=/var/run/docker.sock
fails:podman machine set --rootful=true
), the errors mentioned above do not occur. However, Testcontainers for .NET is either unable to establish a connection to the Resource Reaper or fails:TESTCONTAINERS_DOCKER_SOCKET_OVERRIDE=/var/run/docker.sock
andTESTCONTAINERS_RYUK_CONTAINER_PRIVILEGED=true
.K3sContainer
does not start (rancher/k3s:v1.26.2-k3s1
)LocalStackContainer
does not start (localstack/localstack:1.4
,localstack/localstack:2.0
)mtu
instead of thecom.docker.network.driver.mtu
key is used. Is themtu
a valid key for Docker (it is probably not that important since we only test if TC sets the property)?--hostname
,WithHostname(string)
), the ping commands fails withping: bad address '_container2'
.testcontainers-dotnet/tests/Testcontainers.Tests/Unit/Networks/TestcontainersNetworkTest.cs
Line 47 in f0fef3e
.DependsOn(new NetworkBuilder().Build())
works. The Podman "workaround" does not work with Docker.Solution
-
Benefit
-
Alternatives
-
Would you like to help contributing this enhancement?
Yes
The text was updated successfully, but these errors were encountered: