mirror of
https://github.com/docker/cli.git
synced 2026-01-16 20:22:36 +03:00
The raw mode is actually only needed when you attach to a container. Having it enabled all the time can be a pain, e.g: if docker crashes your terminal will end up in a broken state. Since we are currently missing a real API for the docker daemon to negotiate this kind of options, this changeset actually enable the raw mode on the login (because it outputs a password), run and attach commands. This "optional raw mode" is implemented by passing a more complicated interface than io.Writer as the stdout argument of each command. This interface (DockerConn) exposes a method which allows the command to set the terminal in raw mode or not. Finally, the code added by this changeset will be deprecated by a real API for the docker daemon. Upstream-commit: 7d0ab3858e51a2cea244da72bb842fe15a5a9ded Component: engine