tramp-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: tramp-container doesn't follow `ENV PATH` in docker file


From: ParetoOptimalDev
Subject: Re: tramp-container doesn't follow `ENV PATH` in docker file
Date: Sun, 26 Mar 2023 18:23:01 -0500
User-agent: Gnus/5.13 (Gnus v5.13)

ParetoOptimalDev <pareto.optimal@mailfence.com> writes:


> I thought this meant I could just do:
>
> (add-to-list 'tramp-connection-properties
>              (list (regexp-quote "/docker:")
>                  "remote-shell-login" nil))
>
> However then I get an error actually running the ghc executable and get
> sent into some sort of sub sub shell:
>
>
> ~ $ cd /docker:root@2b2465:
> /docker:root@2b2465:~ # which ghc
> /docker:root@2b2465://opt/ghc/9.4.2/bin/ghc
> /docker:root@2b2465:~ # ghc
> sh: cd: /root/: Permission denied
> ///ee39fe935a84035afb87c3a91b677b7f#$
>
> So it seems the login shell is needed for other things. And for some
> reason permission is denied to `/root/`. Maybe for security reasons.

It seems this is due to using `exec` in `exec docker exec -it 2b2465 /bin/sh  
-i`
rather than `docker exec -it 2b2465 /bin/sh  -i`.

Using `exec` in eshell replaces the eshell process. Maybe in it all works out
in eshell anyway if one instead uses the login shell. Sadly using the
login shell overwrites the PATH environment variable I want to preserve.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]