fix 1476 let ssh use stdin to type password when docker run with -it#1477
fix 1476 let ssh use stdin to type password when docker run with -it#1477lifubang wants to merge 1 commit intodocker:masterfrom
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1477 +/- ##
==========================================
- Coverage 55.14% 54.19% -0.96%
==========================================
Files 289 289
Lines 19371 19386 +15
==========================================
- Hits 10683 10506 -177
- Misses 7997 8204 +207
+ Partials 691 676 -15 |
|
ping @AkihiroSuda PTAL |
|
Thx, can we have e2e? |
f588bbe to
3f8b8a8
Compare
b121f24 to
ed51c23
Compare
So, I think it's very hard to add e2e case. |
The issue with password auth is tracked in docker#1476 and docker#1477 . Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
|
|
||
| if beforeHijack != nil { | ||
| err := beforeHijack() | ||
| if err != nil { |
There was a problem hiding this comment.
nit: if err := beforeHijack(); err != nil {
|
Yes, E2E can be added separately, but I think password auth should not be considered to be supported officially for now then |
The issue with password auth is tracked in docker#1476 and docker#1477 . Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp> (cherry picked from commit 16b014e) Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
cli/command/container/run.go
Outdated
| <-statusChan | ||
| } | ||
| return runStartContainerErr(err) | ||
| if !attach { |
There was a problem hiding this comment.
I guess this if !attach can be moved as an else to the previous condition?
if attach {
...
} else {
// start the container
...
}There was a problem hiding this comment.
Thanks, you are right.
Signed-off-by: Lifubang <lifubang@acmcoder.com>
|
What's current status? |
|
This patch can input password correctly. But I can't find a way to add a test case, I have no idea now. If someone have a time, please take a look #1487 . Thanks. |
|
Will this be fixed soon? I cant use my development docker cli with my home server. I really need this! |
Signed-off-by: Lifubang lifubang@acmcoder.com
- What I did
As the issue #1476, when use ssh with password, docker run -it will fail.
- How I did it
Because after attachContainer, ssh can't use stdin to type password.
So, in func attachContainer, use a call back func beforeHijack to run ContainerStart before hijackedIOStreamer.
- How to verify it
After fix:
- Description for the changelog
modify attachContainer add a param "beforeHijack func() error"
- A picture of a cute animal (not mandatory but encouraged)
