chipmk / docker-mac-net-connect

Connect directly to Docker-for-Mac containers via IP address 🐳 💻
MIT License
414 stars 44 forks source link

How to remove the interfaces again and uninstall everything? #12

Open Yesyoor opened 2 years ago

Yesyoor commented 2 years ago

Hey it does not work for me and now I have this tool on my machine. How can I delete the interfaces again and uninstall it ?

gregnr commented 2 years ago

Hey @Yesyoor! Sorry to hear you're having issues with the tool.

The app was designed to be as simple and un-bloated as possible. Since it is installed using brew, you can perform the reverse actions to uninstall:

  1. Stop the brew service (don't forget sudo):
    sudo brew services stop chipmk/tap/docker-mac-net-connect
  2. Uninstall the brew formula:
    brew uninstall chipmk/tap/docker-mac-net-connect

After stopping the service, the virtual interfaces will disappear. These interfaces can actually only live for as long as the process is running.

Ps. The brew CLI --help option provides some decent documentation on what's happening with services:

$ brew services --help
Usage: brew services [subcommand]

Manage background services with macOS launchctl(1) daemon manager.

If sudo is passed, operate on /Library/LaunchDaemons (started at boot).
Otherwise, operate on ~/Library/LaunchAgents (started at login).

...

[sudo] brew services start (formula|--all|--file=):
    Start the service formula immediately and register it to launch at login
(or boot).

[sudo] brew services stop (formula|--all):
    Stop the service formula immediately and unregister it from launching at
login (or boot).

...

It goes without saying that I would love to help debug the issue you were having if you're open to it. We're always trying to improve this tool to accommodate the different dev environments people are working with.

Yesyoor commented 2 years ago

@gregnr Hey thank you very much for the fast and detailed reply! The second cmd failed for me and it said I have to run: sudo rm -rf /usr/local/Cellar/docker-mac-net-connect/v0.1.2

Which I did. Upon installing it there was something mentioned about files which I would have to manage manually. Unfortunately I don't remember which they were. Are they also cleaned up, or is the management handled back automatically?

Now why I tied this tool, and maybe it was not even made for that, I honestly lack some knowledge about network related things:

I have implemented an authorisation server, a gateway server and a lobby server and wanted to run them as pods on a Minikube. It all worked fine except that I could't connect to it from my client running on the same host machine. This is a docker/ Minikube related issue though which apparently only exists on MacOS. I hoped for your tool to make my nodeports accessible but it didn't (and maybe is not supposed to do so at all). The solution has been to run the Minikube using the virtual box driver, which as I heard only solves it on intel based Macs.