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

Prevent clearing of terminal scrollback buffer in minikube ssh, Docker driver #20145

Open
gitmpr opened this issue Dec 22, 2024 · 0 comments
Open

Comments

@gitmpr
Copy link

gitmpr commented Dec 22, 2024

What Happened?

When using the docker driver on linux, and running minikube ssh,
after logging out, /usr/bin/clear_console is executed by the docker user's ~/.bash_logout, which originates from the default ubuntu /etc/skel/.bash_logout for privacy reasons

Typically this command does not work in non-privileged containers which don't have access to the host's console device.
minikube ssh is mainly used during troubleshooting and local testing. I don't see any privacy concern in this case.
Losing the previous terminal output is probably not the intended expected behavior during minikube troubleshooting.

My proposal is to add a RUN rm /home/docker/.bash_logout
to the kicbase Dockerfile at this line to prevent the terminal from being cleared.

Ubuntu's default /etc/skel/.bash_logout for reference:

# ~/.bash_logout: executed by bash(1) when login shell exits.

# when leaving the console clear the screen to increase privacy

if [ "$SHLVL" = 1 ]; then
    [ -x /usr/bin/clear_console ] && /usr/bin/clear_console -q
fi

Attach the log file

log.txt

Operating System

Ubuntu

Driver

Docker

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant