Open jo-chemla opened 22 hours ago
It seems that only the alias is missing, since running $HOME/.local/bin/poetry --version
does succeed from both container console and code-server console.
With the selection of mods I've used, here are - from the container cmd - the PATH
variable from the container cmd and /var/run/s6/container_environment/PATH
contents:
# DOCKER_MODS=linuxserver/mods:code-server-python3-poetry|linuxserver/mods:universal-docker|
# linuxserver/mods:code-server-pnpm|linuxserver/mods:code-server-nodejs|linuxserver/mods:code-server-zsh|
# linuxserver/mods:code-server-nvm
# tested echo $PATH && printenv PATH && env | /bin/grep PATH
> echo $PATH
/config/.nvm/versions/node/v23.2.0/bin:/config/.local/share/pnpm:/lsiopy/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
> cat /var/run/s6/container_environment/PATH
/command:/lsiopy/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:$HOME/.local/binroot
# Note zsh, nodejs have been added directly to /usr/bin/ so only poetry is missing
What's weird is that from code-server terminal poetry should be accessible since $HOME/.local/bin
is part of $PATH
, but yet poetry command is not found unless called via absolute path
> $ echo $PATH
/app/code-server/lib/vscode/bin/remote-cli:/config/.nvm/versions/node/v23.2.0/bin:/config/.local/share/pnpm:
/command:/lsiopy/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:$HOME/.local/bin
> $ ls $HOME/.local/bin
poetry
> $ $HOME/.local/bin/poetry --version
Poetry (version 1.8.4)
> $ poetry --version
bash: poetry: command not found
Looking at the PR and how path is handled below, it seems that this is done differently in poetry than eg
See alternatives way to set path
here in npmglobal sed -i '1s|^|/config/npm-global/bin:|' /var/run/s6/container_environment/PATH
https://github.com/linuxserver/docker-mods/blob/7fe71cc917b6d9b45069674f8d29f7d1af2b51fa/root/etc/s6-overlay/s6-rc.d/init-mod-code-server-npmglobal-install/run#L12-L13
and here in julia symlinking to /usr/local/bin/poetry
https://github.com/linuxserver/docker-mods/blob/cfc9799d5d5ac650052bd50809e1537d2763b94d/root/etc/s6-overlay/s6-rc.d/init-mod-code-server-julia-install/run#L29
The issue might however come from another docker-mod that erases poetry but not the other due to the order of the modules being loaded - will try to pinpoint which one with more testing.
Is there an existing issue for this?
Name of mod
code-server-python3-poetry
Name of base container
lscr.io/linuxserver/code-server
Current Behavior
I tried the recent https://github.com/linuxserver/docker-mods/issues/958
code-server-python3-poetry
dockermod by @howardt12345 but it seems that poetry is not installed in my setup, since running the following command either in container or code-server console returns:command not found: poetry
Running
python3
does succeed.I also tried restarting the container or re-running compose multiple times, but poetry is never found in path. The whole logs are in the dedicated section, below is the section regarding poetry.
Expected Behavior
According to https://github.com/linuxserver/docker-mods/pull/959 running
poetry --version
should succeed in returning poetry version numberSteps To Reproduce
poetry --version
command not found: poetry
.Environment
CPU architecture
x86-64
Docker creation
Container logs