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 setup on MacOS broke my other Docker setups due to installed proxy #2411

Open
jamesalvarez opened this issue Sep 23, 2024 · 1 comment

Comments

@jamesalvarez
Copy link

jamesalvarez commented Sep 23, 2024

Summary:

I tried to install a test environment using Docker. It didn't work, and furthermore made global settings changes, including dinghy proxy which installs itself in localStorage on localhost, which prevented the rest of my docker setups working. MacOS 14.4.1

Steps to reproduce:

  1. Run docker_dev_setup.sh

Expected behavior:

docker_dev_setup.sh install should install docker resources in standard way that can be spun up and down with docker-compose, and not interfere with global docker setup.

Actual behavior:

docker_dev_setup.sh install installs various undocumented settings and tweaks to global Docker setup (including dinghy http-proxy). Reinstall of docker required, and manual resetting of browser localStorage.

Additional notes:

docker_dev_setup.sh doesn't work, it fails at yarn install as per #2313 and suggested fixes/patches did not work.

@jamesalvarez
Copy link
Author

jamesalvarez commented Sep 23, 2024

The issues lie in dinghy_proxy_setup.sh The script starts a Docker container using the codekitchen/dinghy-http-proxy image.

The container is configured to bind the following host machine ports:
80:80 for HTTP
443:443 for HTTPS
19322:19322/udp for DNS over UDP

This essentially makes these ports unavailable for any other container or application that needs to bind to these ports locally, causing a conflict, which would not be an issue if the proxy shut down with docker-compose down, but this doesn't happen - see the following:

Loopback Alias:

The script ensures that the IP 192.168.42.42 is added as an alias on the lo0 interface of the host machine. This is done to route local .docker domain traffic via this IP. However, this configuration causes further conflicts in networking for other Docker instances that expect traffic to flow through the default Docker network settings on localhost (127.0.0.1).

Persistent Loopback Configuration:

The script creates a plist file to persist the lo0 alias across reboots. This ensures that the proxy settings remain active, perpetuates the issue of port conflicts even after a system restart.

Resolver Configuration:

It modifies DNS resolution by creating a resolver file for the .docker TLD, ensuring that requests to domains ending in .docker are routed to the proxy. This setup interferes with other development setups that rely on standard DNS resolution or different internal DNS configurations.

@jamesalvarez jamesalvarez changed the title Docker setup on MacOS destroyed the rest of my Docker setups Docker setup on MacOS broke my other Docker setups due to installed proxy Sep 23, 2024
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