darwin-containers / rund

OCI Container Runtime for Darwin
Apache License 2.0
432 stars 13 forks source link

How can I exec a existed container which is running? #37

Closed cavivie closed 5 months ago

cavivie commented 5 months ago

Now, docker attach <container_id> can work, but docker exec -it <container_id> /bin/bash can not work, it shows a error: not implemented: unknown

image

slonopotamus commented 5 months ago

This is a good question! And indeed, relevant functionality is not implemented yet.

cavivie commented 5 months ago

So we need to do something like this, right?

cavivie commented 5 months ago

May I know if the reason why it has not been implemented here is that there are any technical restrictions or obstacles? I want to try to implement it.

slonopotamus commented 5 months ago

If you look through service.go, there are multiple different API calls with request.ExecID != "" check. It needs investigation what each of them is supposed to do.

slonopotamus commented 5 months ago

Initial docker exec support was added in rund 0.0.7 (but there could be bugs).

cavivie commented 5 months ago

Thanks