I want to add a Tramp method for opening files from Docker containers. Here's what I've got so far (but it doesn't work):
(add-to-list 'tramp-methods
'("docker"
(tramp-login-program "docker")
(tramp-login-args
(("run" "-ti" "%h" "bash")))))
(setq tramp-debug-buffer t)
(setq tramp-verbose 10)
The output this produces:
Tramp: Opening connection for test-newapi using docker...failed
Tramp: Opening connection for test-newapi using docker...failed
Tramp: Opening connection for test-newapi using docker...failed
Tramp: Opening connection for test-newapi using docker...failed
Tramp: Opening connection for test-newapi using docker...failed
byte-code: Host `test' looks like a remote host, `docker' can only use the local host
When trying to open /docker:test:/
.
Question
How can I see what exactly Tramp was doing (what command did it feed to Docker?)
PS
I found this, but it gives the same result.
PPS
Nevermind, it had to be (tramp-login-args (("run" "-ti") ("%h") ("bash")))
. But I'd still want to know how to debug a problem like this.