emacs-pe / docker-tramp.el

TRAMP integration for docker containers
339 stars 26 forks source link

Is it possible to access binary commands in Docker container? #24

Closed stardiviner closed 5 years ago

stardiviner commented 5 years ago

I want to Emacs CIDER to use clojure binary in Docker container clojure. So I taked a try with following config:

(add-to-list 'exec-path "/docker:clojure:/usr/local/bin/")
(setq cider-clojure-cli-command "/docker:clojure:/usr/local/bin/clojure")

But it report error:

user-error: The /docker:clojure:/usr/local/bin/clojure executable isn’t on your ‘exec-path’

How can I do it?

olessavluk commented 5 years ago

Hi @stardiviner,

Yes, it should work, but instead of specifying exec-path - try to open some .clj file over tramp and then it should automatically use remote executable when you work with it.

I've had similar issue when tried to use sql executable from docker container and solved it this way.

stardiviner commented 5 years ago

Ask an off-topic question, does it have a good performance? In locale machine, or remote machine (That's network issue, I know)?

olessavluk commented 5 years ago

In short - try and you will know. Because it depends from your use case :)

For local development - when I tried to run JS project with lots of file watchers used by webpack (on docker running on OS X host, over mapped filesystem) it was a lot slower than native. However on Linux the same setup works fine (due to native filesystem mapping). So for development on OS X I think it is easier to use everything native.

Also I hear that TRAMP can be slow and has poor support for multiple processes

But when I used it for doing sql - it was great, same as on my local computer but much more convenient.

stardiviner commented 5 years ago

I see. Thanks @olessavluk