docker / for-mac

Bug reports for Docker Desktop for Mac
https://www.docker.com/products/docker#/mac
2.43k stars 118 forks source link

Shell initialization files are modified inconsistently #6751

Open dnicolson opened 1 year ago

dnicolson commented 1 year ago

Expected behavior

Ideally, Docker Desktop to not modify shell initialization files. If this needs to happen, use $HOME instead of a hardcoded directory and ensure that the init-bash.sh/init-zsh.sh/init-fish.sh scripts are available in the ~/.docker directory.

Actual behavior

On machine 1, the files ~/.bashrc, ~/.bash_profile, ~/.zshrc, and ~/.config/fish/config.fish files were modified with the following line (or equivalent):

source /Users/<user>/.docker/init-bash.sh || true # Added by Docker Desktop

These files are symlinked and synced via Dropbox and on machine 2 the username is different, which results in shell issues. Even if the usernames were the same, on machine 2 the init-bash.sh/init-zsh.sh/init-fish.sh/bin files/directories do not even exist.

Information

Output of /Applications/Docker.app/Contents/MacOS/com.docker.diagnose check

[2023-03-05T20:06:13.955319000Z][com.docker.diagnose][I] set path configuration to OnHost
Starting diagnostics

[PASS] DD0027: is there available disk space on the host?
[PASS] DD0028: is there available VM disk space?
[PASS] DD0018: does the host support virtualization?
[PASS] DD0001: is the application running?
[PASS] DD0017: can a VM be started?
[PASS] DD0016: is the LinuxKit VM running?
[PASS] DD0011: are the LinuxKit services running?
[PASS] DD0004: is the Docker engine running?
[PASS] DD0015: are the binary symlinks installed?
[PASS] DD0031: does the Docker API work?
[PASS] DD0013: is the $PATH ok?
[PASS] DD0003: is the Docker CLI working?
[PASS] DD0038: is the connection to Docker working?
[PASS] DD0014: are the backend processes running?
[PASS] DD0007: is the backend responding?
[PASS] DD0008: is the native API responding?
[PASS] DD0009: is the vpnkit API responding?
[PASS] DD0010: is the Docker API proxy responding?
[SKIP] DD0030: is the image access management authorized?
[PASS] DD0033: does the host have Internet access?
[PASS] DD0018: does the host support virtualization?
[PASS] DD0001: is the application running?
[PASS] DD0017: can a VM be started?
[PASS] DD0016: is the LinuxKit VM running?
[PASS] DD0011: are the LinuxKit services running?
[PASS] DD0004: is the Docker engine running?
[PASS] DD0015: are the binary symlinks installed?
[PASS] DD0031: does the Docker API work?
[PASS] DD0032: do Docker networks overlap with host IPs?
No fatal errors detected.

Steps to reproduce the behavior

There are no steps to reproduce this behavior. On machine 1 the shell initialization files were modified but after undoing those changes Docker Desktop on machine 2 has not remade the changes.

docker-robot[bot] commented 1 year ago

There hasn't been any activity on this issue for a long time. If the problem is still relevant, mark the issue as fresh with a /remove-lifecycle stale comment. If not, this issue will be closed in 30 days.

Prevent issues from auto-closing with a /lifecycle frozen comment.

/lifecycle stale