practicalli / spacemacs

Content for the book - Clojure Development with Spacemacs
https://practical.li/spacemacs
Creative Commons Attribution Share Alike 4.0 International
109 stars 33 forks source link

eshell alias for changing director to dockker with docker-tramp #274

Open practicalli-johnny opened 3 years ago

practicalli-johnny commented 3 years ago

eshell alias I use for cd'ing to a docker container with docker-tramp:

alias dcd cd /docker:${docker ps -qf "name=$1"}:~/

You probably want to make sure you're using the docker container's absolute file path after the : in the format /docker:user@container:/absolute/path/to/file 01:05 in the eshell alias above, you can cd into a container named example with the command dcd example