-
Notifications
You must be signed in to change notification settings - Fork 18.6k
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
Proposal: allow docker attach
for non-running containers
#26705
Comments
ping @crosbymichael @mlaventure PTAL |
Switched labels as this is allowed in API already. Does this have to be cli flag or can't you use the client API? Public |
@tonistiigi We can't use the Go API, because Compose is written in Python! Shelling out to |
Perhaps @tonistiigi meant the |
Well, those API endpoints are what we're using right now. The problem is that replicating all of the interactive functionality of All of that logic has been reimplemented in Python, which has inevitably become a huge time sink and a source of many bugs over the years. It's also currently POSIX-only, because attaching interactively on Windows involves a completely different set of system calls. Accordingly, over time, we'd like to remove it and rely on the Docker client binary instead. |
Ah, clear. (I think ideally, we should have an improved API to make it easier to use) |
@aanand How about |
@tonistiigi I didn't know about |
In Compose (specifically
docker-compose run
), instead of duplicating all of Docker's considerable client-side attach logic, we'd like to start shelling out todocker attach
instead, so we have better parity across all platforms (especially Windows).However, there's currently client-side code which prohibits a user from
docker attach
-ing to a non-running container. This is a showstopper: to avoid race conditions, the order of operations must be create, attach, start.I'd like to either remove this logic or add a flag to skip it.
The text was updated successfully, but these errors were encountered: