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

Docker-Desktop adds ~/.docker/bin/ to my $PATH without telling me #6664

Closed
JannikArndt opened this issue Jan 6, 2023 · 8 comments
Closed

Comments

@JannikArndt
Copy link

After updating to Docker Desktop 4.15.0, it added

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

to my .zshrc. It also created .config/fish/config.fish, .bash_profile and .bashrc with the same line.

The bin folder is currently empty, which makes this even more suspicious.

I consider this bad behavior. Apps are not supposed to change my $PATH without at least telling me or mentioning it in the Release Notes.

@JannikArndt JannikArndt changed the title Docker-Desktop adds ~/.docker/bin/ to my $PATH without telling me Docker-Desktop adds ~/.docker/bin/ to my $PATH without telling me Jan 6, 2023
@jaminthorns
Copy link

jaminthorns commented Jan 17, 2023

I just encountered this and have the same opinion. Modifying my shell initialization scripts automatically is pretty terrible behavior. What's worse is that if I change a single character of the line it adds, then the line gets added again. On top of all that, this happpens every time Docker Desktop is started. I've never had a program behave so aggressively before.

Since all Docker Desktop is doing is ensuring that some binaries are on the PATH, what it should be doing instead is symlinking those binaries to /usr/local/bin, and that operation should be explicitly allowed/initiated by the user. VS Code takes this approach with its code binary, and it achieves the same goal in a much more appropriate way.

@christophermclellan
Copy link

christophermclellan commented Jan 19, 2023

Hi @JannikArndt and @jaminthorns ! Firstly, apologies for this. We're looking to address these issues asap. In particular, ensuring that the user explicitly authorises the operation to adjust the $PATH. I wonder if I could schedule ~30 mins with each of you to get some feedback on how we're thinking of solving this via a new flow ? @JannikArndt i see you have an email on your profile so I'll reach out directly ! @jaminthorns - my email is chris.mclellan@docker.com, i'd love to hear from you, if you're able to spare the time ! Thanks again for the feedback.

@goerge
Copy link

goerge commented Feb 19, 2023

@christophermclellan Could you please explain why Docker is adding it's own bin folder to the path although it's empty?

@gimbo
Copy link

gimbo commented Mar 29, 2023

@christophermclellan wrote:

We're looking to address these issues asap.

Any progress on this?

@christophermclellan
Copy link

@gimbo this will be resolved via the new install flow for Desktop v4.18, which is due to be released this week.

javierjulio added a commit to javierjulio/laptop that referenced this issue Apr 8, 2023
docker/for-mac#6664

https://docs.docker.com/desktop/mac/permission-requirements/#installing-symlinks

> With version 4.18 or later, you can choose whether to install symlinks either in /usr/local/bin or $HOME/.docker/bin during installation of Docker Desktop.
@gimbo
Copy link

gimbo commented Apr 18, 2023

LGTM.

I just shut down v4.16, removed the lines it had added from ~/.zshrc/~/.profile, installed v4.18, and started it — and it didn't add them back in. I see that in Settings/Advanced it had auto-selected "User" configuration for the CLI tools, presumably because it detected they were already in ~/.docker/bin. So I just need to set up PATH in my way, and all is good.

Many thanks! 🙏

@christophermclellan
Copy link

Thanks for confirming @gimbo. I'll close this issue until further notice.

@docker-robott
Copy link
Collaborator

Closed issues are locked after 30 days of inactivity.
This helps our team focus on active issues.

If you have found a problem that seems similar to this, please open a new issue.

/lifecycle locked

@docker docker locked and limited conversation to collaborators May 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants