I made some progress and I figured out how to get the `ENV PATH` value with a weird hacky feeling method:
#+begin_src sh docker run -t haskell bash -c 'env PATH=$PATH bash -c "echo $PATH"' #+end_src #+RESULTS: : /root/.cabal/bin:/root/.local/bin:/opt/ghc/9.4.2/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin I tried to modify the `tramp-docker-method` in `tramp-methods` to utilize the above command but it didn't work. Here was my attempt: (add-to-list 'tramp-methods `(,tramp-docker-method (tramp-login-program ,tramp-docker-program) (tramp-login-args (("exec") ("-it") ("-u" "%u") ("%h") ("%l") )) (tramp-direct-async (,tramp-default-remote-shell "-c")) (tramp-remote-shell ,tramp-default-remote-shell) (tramp-remote-shell-login ("-l")) (tramp-remote-shell-args ("-i" "-c" "'env PATH=$PATH'")))) Can anyone help with this?