[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: sh -c 'whoami' gives permission error in docker container and puts m
From: |
Michael Albinus |
Subject: |
Re: sh -c 'whoami' gives permission error in docker container and puts me in weird prompt/subshell |
Date: |
Wed, 05 Apr 2023 18:09:13 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
ParetoOptimalDev <pareto.optimal@mailfence.com> writes:
Hi,
> This should
> work from any machine with docker and emacs 29+. Reminder that I'm using
> emacs 30.0.50.
>
> Also note I'm executing these steps and pasting them as I verify they are
> valid
> from `emacs -Q` with emacs 30.0.50.
Thanks.
I'm on Fedora, so I have to use "podman" instead of "docker". But this
shouldn't make a difference.
> 1. Start `emacs -Q`
>
> 2. Start the alpine docker container using a specific tag by evaluating:
>
> (async-shell-command "docker run --name alpine3173 --rm -it alpine:3.17.3 sh"
> "*docker run alpine sh*")
>
> 3. open dired in the alpine container
>
> C-x C-f /docker:root@alpine3173: RET
>
> 4. Open eshell with M-x eshell
>
> 5. Try to run any command that eshell does not implement which exists in
> the docker container's PATH.
>
> `chown` for instance:
>
> Welcome to the Emacs shell
>
> /docker:root@alpine3173:~ # chown
> ‘echo \"`uname -sr`\"’ does not return a valid Lisp expression: ‘sh: uname:
> command not found
> ""
> ’
I have followed your steps by cut'n'paste (replacing "docker" with
"podman"). The result in the *eshell* buffer
--8<---------------cut here---------------start------------->8---
/podman:root@alpine3173:~ # chown
BusyBox v1.35.0 (2022-11-19 10:13:10 UTC) multi-call binary.
Usage: chown [-RhLHPcvf]... USER[:[GRP]] FILE...
Change the owner and/or group of FILEs to USER and/or GRP
-h Affect symlinks instead of symlink targets
-L Traverse all symlinks to directories
-H Traverse symlinks on command line only
-P Don't traverse symlinks (default)
-R Recurse
-c List changed files
-v Verbose
-f Hide errors
/podman:root@alpine3173:~ #
--8<---------------cut here---------------end--------------->8---
As expected. Please rerun your recipe, but start Emacs like
--8<---------------cut here---------------start------------->8---
emacs -Q -l tramp --eval '(setq tramp-verbose 10)'
--8<---------------cut here---------------end--------------->8---
When the chown command fails, send the complete Tramp debug buffer. I
must see what Eshell does.
Best regards, Michael.
- Re: sh -c 'whoami' gives permission error in docker container and puts me in weird prompt/subshell, (continued)
- Re: sh -c 'whoami' gives permission error in docker container and puts me in weird prompt/subshell, Michael Albinus, 2023/04/04
- Re: sh -c 'whoami' gives permission error in docker container and puts me in weird prompt/subshell, ParetoOptimalDev, 2023/04/04
- Re: sh -c 'whoami' gives permission error in docker container and puts me in weird prompt/subshell, ParetoOptimalDev, 2023/04/05
- Re: sh -c 'whoami' gives permission error in docker container and puts me in weird prompt/subshell, Michael Albinus, 2023/04/05
- Re: sh -c 'whoami' gives permission error in docker container and puts me in weird prompt/subshell, ParetoOptimalDev, 2023/04/05
- Re: sh -c 'whoami' gives permission error in docker container and puts me in weird prompt/subshell, ParetoOptimalDev, 2023/04/05
- Re: sh -c 'whoami' gives permission error in docker container and puts me in weird prompt/subshell, ParetoOptimalDev, 2023/04/05
- Re: sh -c 'whoami' gives permission error in docker container and puts me in weird prompt/subshell, Michael Albinus, 2023/04/05
- Re: sh -c 'whoami' gives permission error in docker container and puts me in weird prompt/subshell, Michael Albinus, 2023/04/05
- Re: sh -c 'whoami' gives permission error in docker container and puts me in weird prompt/subshell, ParetoOptimalDev, 2023/04/05
- Re: sh -c 'whoami' gives permission error in docker container and puts me in weird prompt/subshell,
Michael Albinus <=
- Re: sh -c 'whoami' gives permission error in docker container and puts me in weird prompt/subshell, ParetoOptimalDev, 2023/04/05
- Re: sh -c 'whoami' gives permission error in docker container and puts me in weird prompt/subshell, Michael Albinus, 2023/04/05
- Re: sh -c 'whoami' gives permission error in docker container and puts me in weird prompt/subshell, ParetoOptimalDev, 2023/04/05
- Re: sh -c 'whoami' gives permission error in docker container and puts me in weird prompt/subshell, ParetoOptimalDev, 2023/04/05
- Re: sh -c 'whoami' gives permission error in docker container and puts me in weird prompt/subshell, Michael Albinus, 2023/04/06
- Re: sh -c 'whoami' gives permission error in docker container and puts me in weird prompt/subshell, ParetoOptimalDev, 2023/04/06
- Re: sh -c 'whoami' gives permission error in docker container and puts me in weird prompt/subshell, Michael Albinus, 2023/04/07
- Re: sh -c 'whoami' gives permission error in docker container and puts me in weird prompt/subshell, ParetoOptimalDev, 2023/04/07
- Re: sh -c 'whoami' gives permission error in docker container and puts me in weird prompt/subshell, Michael Albinus, 2023/04/08
- Re: sh -c 'whoami' gives permission error in docker container and puts me in weird prompt/subshell, ParetoOptimalDev, 2023/04/14