reddit / emacs

How to use docker tramp?

QueenOfHatred · 2022-12-08 19:10
I just... don't understand... No matter what, I can't access files inside docker... After doing C-x C-f /docker:(Here I put in docker id):/ But after that, I can access nothing. No matter what path I enter afterwards, it will result in asking me to make-directory, since it doesn't exist. Nothing. I tried volumes as well, yet, nothing.
slashkehrin · 2022-12-08 20:12
I haven't used the docker tramp integration (yet) but I thought that's only available in Emacs 29. Are you running that version of Emacs already?
BigRiverBlues · 2022-12-08 21:13
What docker image are you using? Can you use docker cp commands to move files into the container? Can you docker exec a bash shell and move around the file system?
BigRiverBlues · 2022-12-08 21:14
I've used it a few times over the years on Emacs 27,28, or 26, not sure exactly which was the earliest version
mickeyp · 2022-12-08 21:14
Indeed. But there's a package on MELPA that does it for older versions.
zelphirkaltstahl · 2022-12-09 01:08
It should be listing running container ids. Maybe all that is left is to press tab? Hate to be that guy, but: For me it works. (On Emacs 28.) I've even been able to go tramp SSH into docker container on a server and edit files there.
deaddyfreddy · 2022-12-12 11:21
try docker.el