Add support for 'docker exec' - phase 1#7409
Conversation
|
Note: This patch depends on docker-archive/libcontainer#141. |
|
Ping @crosbymichael @tianon |
|
+1. An invaluable feature which means that you no longer need to manually use |
There was a problem hiding this comment.
strncmp? (Just to avoid all known vulnerable functions)
There was a problem hiding this comment.
Well, strcmp isn't vulnerable unless you're doing cryptographic comparisons (where you need to use strictly O(n) comparisons for any inputs). There's no danger of buffer overflow (since there's no writes occuring) or any real out-of-bounds errors (since IIRC strcmp compares lengths to give you a positive or negative return value).
|
This UX change desperatly needs documentation, both in |
|
@SvenDowideit I will add/update the docs once I get a go ahead from the maintainers for this patch. |
|
Bumping this. Is there any work happening on this PR? |
|
I am working on rebasing this to current head. I will update this PR once On Sat, Sep 6, 2014 at 10:31 PM, Aleksa Sarai [email protected]
|
740e6ed to
57cd0b5
Compare
|
I have rebased this PR against the current docker head and libcontainer head. PTAL @crosbymichael @vieux |
|
@vishh This patch need some integration-cli tests. |
|
@LK4D4: I will add a few tests soon. Meanwhile, it will be helpful to know if the maintainers are committed to merging this feature anytime soon. |
There was a problem hiding this comment.
can body be data? I personally always think about body as about []byte.
There was a problem hiding this comment.
Done. But it is the body of the request.
|
Phew, I've read all code. This will be a "killer feature". |
|
@crosbymichael: there should already be a TODO to add resizing support. I On Wed, Sep 10, 2014, 11:03 PM Sven Dowideit [email protected]
|
|
Thanks for the pointer @LK4D4. @crosbymichael: If the two issues you raised are not showstoppers for this feature, can we proceed with merging this feature, while I work on resolving those issues? The daemon connection error is not user visible. |
|
I think the resize issue maybe a big one |
There was a problem hiding this comment.
instantiate
Also, pardon my ignorance, but the "select" what?
|
Docs LGTM once my nit-picky comments are addressed. Thanks for your contribution! |
|
Need rebase :/ So big patch... |
|
As per discussions on 'docker-dev' IRC, I will be stashing the CLI and docs On Fri, Sep 12, 2014 at 11:54 AM, Alexandr Morozov <[email protected]
|
Modified Attach() method to support docker exec. Docker-DCO-1.1-Signed-off-by: Vishnu Kannan <[email protected]> (github: vishh)
Docker-DCO-1.1-Signed-off-by: Vishnu Kannan <[email protected]> (github: vishh)
Docker-DCO-1.1-Signed-off-by: Vishnu Kannan <[email protected]> (github: vishh)
Docker-DCO-1.1-Signed-off-by: Vishnu Kannan <[email protected]> (github: vishh)
…' feature. Docker-DCO-1.1-Signed-off-by: Vishnu Kannan <[email protected]> (github: vishh)
Docker-DCO-1.1-Signed-off-by: Vishnu Kannan <[email protected]> (github: vishh)
Docker-DCO-1.1-Signed-off-by: Vishnu Kannan <[email protected]> (github: vishh)
Docker-DCO-1.1-Signed-off-by: Vishnu Kannan <[email protected]> (github: vishh)
dcdf093 to
0029180
Compare
|
I have removed the 'exec' feature from the CLI. |
There was a problem hiding this comment.
@vishh I strongly believe the docs here need the following amendments:
dockershould beDockerin most casesstdin,stdout, etc., should be all capitalized (e.g.,.. exit on stdin close>>.. on STDIN close)- Please clarify or point out what "exec" is (used at various places)
- Please clarify what "command" refers to (e.g.,
Error running command.. Does this mean any command? The command passed? A command Docker was just asked to execute?) lxc>LXCas well.
There was a problem hiding this comment.
@ostezer:
The docs have been moved to #8062 for technical reasons.
- It is already 'Docker'. By 'docs' are you referring to the source code or the changes to files inside docs/ directory?
- Done.
- I followed the docs that exist for 'docker run'. Can you point me at specific places in the docs where the usage of 'exec' is not clear? I will be happy to address them.
- Can you point me at the line in the source where the usage of 'command' is not clear?
- Again point me at the source please.
… resizing of tty sessions for exec'ed commands. Docker-DCO-1.1-Signed-off-by: Vishnu Kannan <[email protected]> (github: vishh)
0029180 to
57fa003
Compare
|
Closed in favor of #8062 |
This patch brings in support for running a new command in an existing and active container.
Fixes #6777 and #1228.
Some use cases:
API
Client: 'docker exec redis touch /tmp/file'
Remote: '/containers/redis/exec'