testcontainers-go icon indicating copy to clipboard operation
testcontainers-go copied to clipboard

[Enhancement]: Containerd support

Open eikenb opened this issue 1 year ago • 2 comments

Proposal

I'd love to be able to use testcontainers to spin up containers in Containerd for testing. Our platform is built directly on containerd.

I tried using Docker for the testcontainers as it uses containerd for the backend, but the containers weren't available via the containerd API (though the "moby" namespace was added). I am using somewhat older versions (docker.io 20.10.24, containerd 1.6.20) as our platform is Debian stable, so maybe this has been addressed in newer version. But native containerd support would still be preferable.

Thanks.

eikenb avatar May 23 '24 19:05 eikenb

Just to clarify, you want to use Docker with containerd backend enabled, correct? This should work, but we need to double check.

With regards to native containerd support, since we integrate with Docker through its REST API, I don't see this on our roadmaps as of now. As it stands, I would say containerd is on a lower abstraction level compared to what we currently use as our container runtime abstraction in the form of Docker.

I thinks this article does a good job highlighting the differences in abstraction level and features.

kiview avatar May 24 '24 09:05 kiview

Thanks for the quick response!

To clarify I wanted to submit an issue about containerd support as I was hoping it might be supported at some point and there wasn't one already submitted so I wasn't sure of the thinking around that. I understand that it uses a different API and so is not an easy pick up, but I wanted to ask to be sure and to get an issue on record.

~In regard to my attempt at using Docker as a frontend to containerd, I did think this would work. That I could use testcontainers w/ the Docker host, spin up a container and then use the containerd API to work with that container. But after running a container w/ docker I tried finding it using using containerd (eg. ctr -n moby task list) without luck. Any insights here would be appreciated as spinning up containers is a bit of a slog with the containerd API.~ I was able to get this (ctr seeing docker changes) working after finding an issue with my environment.

Thanks.

eikenb avatar May 24 '24 18:05 eikenb

@eikenb I'm closing this as per your comment. Thanks!

mdelapenya avatar Aug 22 '24 12:08 mdelapenya