Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to disable debug shell #1139

Closed
Ham3D opened this issue Apr 18, 2024 · 7 comments
Closed

how to disable debug shell #1139

Ham3D opened this issue Apr 18, 2024 · 7 comments
Labels
t/bug Something isn't working
Milestone

Comments

@Ham3D
Copy link

Ham3D commented Apr 18, 2024

Describe the bug

for some reason, after latest update (OrbStack 1.5.1) on my machine, when i open a terminal to a container (that i already uses it with older versions of orbstack), it cannot find the already installed packages.
in my case, PHP
when i try php -v, it says command not found, and suggest to install php by itself.
when i install it, it install the latest version, and mess up my other containers which contains different version of php

so, How can i disable Debug mode? [whats the purpose of Terminal & Debug buttons when they do both the same thing]

To Reproduce

No response

Expected behavior

No response

Diagnostic report (REQUIRED)

No response

Screenshots and additional context (optional)

No response

@Ham3D Ham3D added the t/bug Something isn't working label Apr 18, 2024
@kdrag0n
Copy link
Member

kdrag0n commented Apr 18, 2024

Can you share the container image so we can reproduce this?

@Ham3D
Copy link
Author

Ham3D commented Apr 19, 2024 via email

@eXaminator
Copy link

I ran into the same error. Is there a way to permanently add a path to the PATH variable for the debug shell?

@kdrag0n
Copy link
Member

kdrag0n commented May 12, 2024

Can you share the output of:

env
cat /proc/1/environ | tr '\0' '\n'

@oisceo
Copy link

oisceo commented May 31, 2024

I have the same issue. Tools that are present in the container are no longer usable, unless you specify the full path. Which is understandable if you look at $PATH.

root@docker_php /var/www/html
❯ echo $PATH | tr ':' '\n'
/nix/orb/sys/zsh/cache/https-COLON--SLASH--SLASH-github.com-SLASH-bigH-SLASH-git-fuzzy/bin
/nix/orb/sys/zsh/cache/https-COLON--SLASH--SLASH-github.com-SLASH-caarlos0-SLASH-zsh-open-pr
/nix/orb/sys/zsh/cache/https-COLON--SLASH--SLASH-github.com-SLASH-caarlos0-SLASH-zsh-git-fetch-merge
/nix/orb/sys/zsh/cache/https-COLON--SLASH--SLASH-github.com-SLASH-caarlos0-SLASH-ports
/nix/orb/data/.env-out/bin
/nix/orb/sys/bin
root@docker_php /var/www/html
❯ cat /proc/1/environ | tr '\0' '\n'
 master process (/usr/local/etc/php-fpm.conf)





# Followed by more than 900 newlines

@oisceo
Copy link

oisceo commented Jun 5, 2024

I found a way to reproduce it:

Start a container like this and PATH looks as you would expect:

docker run --rm -it php:8.1-fpm bash

From the debug shell:

root@0bbb77a16f64 /var/www/html
❯ echo $PATH | tr ':' '\n'
/nix/orb/sys/zsh/cache/https-COLON--SLASH--SLASH-github.com-SLASH-bigH-SLASH-git-fuzzy/bin
/nix/orb/sys/zsh/cache/https-COLON--SLASH--SLASH-github.com-SLASH-caarlos0-SLASH-zsh-open-pr
/nix/orb/sys/zsh/cache/https-COLON--SLASH--SLASH-github.com-SLASH-caarlos0-SLASH-zsh-git-fetch-merge
/nix/orb/sys/zsh/cache/https-COLON--SLASH--SLASH-github.com-SLASH-caarlos0-SLASH-ports
/nix/orb/data/.env-out/bin
/nix/orb/sys/bin
/usr/local/sbin
/usr/local/bin
/usr/sbin
/usr/bin
/sbin
/bin

Start the container as part of a docker compose project:

services:
  php:
    image: php:8.1-fpm

From the debug shell:

root@298ae804879a /var/www/html
❯ echo $PATH | tr ':' '\n'
/nix/orb/sys/zsh/cache/https-COLON--SLASH--SLASH-github.com-SLASH-bigH-SLASH-git-fuzzy/bin
/nix/orb/sys/zsh/cache/https-COLON--SLASH--SLASH-github.com-SLASH-caarlos0-SLASH-zsh-open-pr
/nix/orb/sys/zsh/cache/https-COLON--SLASH--SLASH-github.com-SLASH-caarlos0-SLASH-zsh-git-fetch-merge
/nix/orb/sys/zsh/cache/https-COLON--SLASH--SLASH-github.com-SLASH-caarlos0-SLASH-ports
/nix/orb/data/.env-out/bin
/nix/orb/sys/bin

@kdrag0n
Copy link
Member

kdrag0n commented Jun 8, 2024

Fixed for the next version. Thanks for the reproducer!

@kdrag0n kdrag0n closed this as completed Jun 8, 2024
@kdrag0n kdrag0n added this to the v1.7.0 milestone Jun 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants