tramp-devel
[Top][All Lists]
Advanced

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

sh -c 'whoami' gives permission error in docker container and puts me in


From: ParetoOptimalDev
Subject: sh -c 'whoami' gives permission error in docker container and puts me in weird prompt/subshell
Date: Mon, 03 Apr 2023 16:06:05 -0500
User-agent: Gnus/5.13 (Gnus v5.13)

I'm using emacs -Q and versions are:

- GNU Emacs 30.0.50
- 2.7.0-pre

This was using https://hub.docker.com/_/haskell/ and running it with:

(async-shell-command "docker run --name haskell-944 --rm -it
haskell:9.4.4-slim bash" "*docker run haskell 944 slim bash*")

This container is based on debian 10 it seems:

$ docker exec haskell-944 sh -c 'cat /etc/issue'
Debian GNU/Linux 10 \n \l

Then I tried to run my `sh -c` command in eshell:

~ $ cd /docker:haskell-944:
/docker:haskell-944:~ # sh -c 'whoami'
sh: cd: /root/: Permission denied
///04f3ec959fa255158cbd75f81fe08631#$exit
exit

I also tried bash:

/docker:haskell-944:~ # bash -c whoami
sh: cd: /root/: Permission denied
///04f3ec959fa255158cbd75f81fe08631#$exit
exit

How can I further debug this? What is this prompt I'm stuck in from?

It seems like some other tramp function used or didn't use something
interactive or tty related?

Thanks.

P.S. I have a related issue about getting the right PATH in docker
containers, but it seems that in this container simple binaries aren't
even running correctly for some reason.




reply via email to

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