3 ms·
Thank you! I'll have to check this out. It baffles me that a company such as Docker has yet to make using its primary product on Mac OS X simple plug and play.
by BinaryIdiot 11y ago
Thank you! I'll have to check this out. It baffles me that a company such as Docker has yet to make using its primary product on Mac OS X simple plug and play. Needing to remember to run `eval $(docker-machine env docker)` is not a sustainable solution. Hell I know about this and would occasionally forget and become confused at the error messages.
In fact I put this horrible hack into my ~/.bash_profile (I wouldn't recommend doing this but, hey, it works.):
docker-machine start dev
eval "$(docker-machine env dev)"
- bentruyman 11y agoOne thing I do to avoid this is to write out the Docker environment to a file in my home directory. Then I source that file, if it exists, for each new terminal session. Not perfect, but you can see it here: https://github.com/bentruyman/dotfiles/blob/392914f92e5a8d8d9fc20cc967aadc1a3971e99b/env/docker.sh https://github.com/bentruyman/dotfiles/blob/392914f92e5a8d8d... But DLite appears to resolve a lot of this 'hackiness'.
- rocky1138 11y agoFrom my understanding, the limitation is from OSX and not from Docker, as OSX does not have native support for kernel namespacing. This is why Docker on OSX runs inside of a Linux virtual machine.
- lotyrin 11y agoMaking OSX Linux is hard, but making Docker smarter about running on OSX is easy (have docker-machine provide a socket like this project does, have docker client detect the environment and connect to the correct virtual machine's docker socket) and would be an obvious huge step forward.
- rocky1138 11y agoYeah, sure, I agree, there's a lot of room for improvement. But, I still talk to a lot of developers who are new to Docker and use OSX, who are confused as to why they need to run a VM or enter docker commands into a different terminal than they are used to.