Connect directly to Docker-for-Mac containers via IP address 🐳 💻

Docker Mac Net Connect

Connect directly to Docker-for-Mac containers via IP address.

Features

  • L3 connectivity: Connect to Docker containers from macOS host (without port binding).
  • Lightweight: Based on WireGuard (built-in to Linux kernel).
  • Hands-off: Install once and forget. No need to re-configure every time you restart your Mac or Docker daemon.
  • Automatic: Docker networks are automatically added/removed from macOS routing table.
  • No bloat: Everything is handled by a single binary. No external dependencies/tools are needed.

Installation

# Install via Homebrew
$ brew install chipmk/tap/docker-mac-net-connect

# Run the service and register it to launch at boot
$ sudo brew services start chipmk/tap/docker-mac-net-connect

Usage

After installing, you will be able to do this:

# Run an nginx container
$ docker run --rm --name nginx -d nginx

# Get the internal IP for the container
$ docker inspect nginx --format '{{.NetworkSettings.IPAddress}}'
172.17.0.2

# Make an HTTP request directly to its IP
$ curl -I 172.17.0.2
HTTP/1.1 200 OK
Server: nginx/1.21.3
Date: Thu, 11 Nov 2021 21:00:37 GMT
Content-Type: text/html
Content-Length: 615
Last-Modified: Tue, 07 Sep 2021 15:21:03 GMT
Connection: keep-alive
ETag: "6137835f-267"
Accept-Ranges: bytes

Background

Accessing containers directly by IP (instead of port binding) can be useful and convenient.

Problem

Unlike Docker on Linux, Docker-for-Mac does not expose container networks directly on the macOS host. Docker-for-Mac works by running a Linux VM under the hood (using hyperkit) and creates containers within that VM.

Docker-for-Mac supports connecting to containers over Layer 4 (port binding), but not Layer 3 (by IP address).

Solution

Create a minimal network tunnel between macOS and the Docker Desktop Linux VM. The tunnel is implemented using WireGuard.

Why WireGuard?

WireGuard is an extremely lightweight and fast VPN. It’s also built in to the Linux kernel, which means no background processes/containers are required. It is the perfect tool for this application.

How does it work?

Connection Diagram

macOS side

A lightweight customized WireGuard server (docker-mac-net-connect) runs on your macOS host and creates a virtual network interface (utun) that acts as the link between your Mac and the Docker Desktop Linux VM.

Linux VM side

Since WireGuard is built into the Linux kernel, all we need to do is configure the VM with a virtual network interface that links to the macOS host. No background processes or containers are required.

How do we configure the VM? A one-time container is deployed with just enough privileges to configure the Linux host’s network interfaces (—-cap-add=NET_ADMIN + -—net=host).

The container creates the interface, configures WireGuard, then exits and is destroyed. The WireGuard interface continues working after the container is gone because it was created on the Linux host’s network namespace, not the container’s.

Tying it together

The server on macOS monitors your Docker container networks and automatically adds their subnets to your macOS routing table (routing through the utun interface). Now you can connect to any container directly by it’s IP address from your macOS host. Eg.

# Run an nginx container
$ docker run --rm --name nginx -d nginx

# Get the internal IP for the container
$ docker inspect nginx --format '{{.NetworkSettings.IPAddress}}'
172.17.0.2

# Make an HTTP request directly to its IP
$ curl -I 172.17.0.2
HTTP/1.1 200 OK
Server: nginx/1.21.3
Date: Thu, 11 Nov 2021 21:00:37 GMT
Content-Type: text/html
Content-Length: 615
Last-Modified: Tue, 07 Sep 2021 15:21:03 GMT
Connection: keep-alive
ETag: "6137835f-267"
Accept-Ranges: bytes

Other Solutions

Other great solutions have been created to solve this, but none of them are as turn-key and lightweight as we wanted.

  • docker-tuntap-osx

    • Requires installing third party tuntap kernel extension
    • Requires manually re-running a script every time the Docker VM restarts to bring the network interface back up
    • Docker network subnets have to be routed manually
  • docker-mac-network

    • Requires installing an OpenVPN client (ie. Tunnelblick)
    • Requires an OpenVPN server container to be running at all times in order to function
    • Docker network subnets have to be routed manually

FAQ

Is this secure?

This tool piggybacks off of WireGuard which has gone through numerous audits and security tests (it is built-in to the Linux kernel after all). The docker-mac-net-connect server generates new private/public key pairs for each WireGuard peer every time it runs. No values are hard-coded.

Network traffic runs directly between the macOS host and local Linux VM - no external connections are made.

Can I use this in production?

This tool was designed to assist with development on macOS. Since Docker-for-Mac isn't designed for production workloads, neither is this.

What happens if Docker Desktop restarts?

The server detects when the Docker daemon stops and automatically reconfigures the tunnel when it starts back up.

Do you add/remove routes when Docker networks change?

Yes, the server watches the Docker daemon for both network creations and deletions and will add/remove routes accordingly.

For example, let's create a Docker network with subnet 172.200.0.0/16:

# First validate that no route exists for the subnet
sudo netstat -rnf inet | grep 172.200

# Create the docker network
$ docker network create --subnet 172.200.0.0/16 my-network

# Check the routing table - a new route exists
$ sudo netstat -rnf inet | grep 172.200
172.200            utun0              USc          utun0

# Remove the docker network
$ docker network rm my-network

# The route has been removed
sudo netstat -rnf inet | grep 172.200

Will routes remain orphaned in the routing table if the server crashes?

No, routes are tied to the utun device created by the server. If the server dies, the utun interface will disappear along with its routes.

Why does the service need to run as root?

Root permissions are required by the service to:

  • Create a utun network interface
  • Configure the utun interface (ifconfig)
  • Add and remove routes in the routing table (route)

This app tries to minimize opportunity for privilege escalation by following the principle of least privilege (PoLP). With that said, macOS has no concept of fine-grained admin privileges (ie. capabilities), so running as sudo is required.

License

MIT

Comments
  • Timeouts after reboot

    Timeouts after reboot

    I had everything setup and working but after a restart, I get requests timeout when trying to access the containers. Wireguard interface is up and accessible from host:

     $ ping 10.33.33.2
    PING 10.33.33.2 (10.33.33.2): 56 data bytes
    64 bytes from 10.33.33.2: icmp_seq=0 ttl=64 time=0.809 ms
    64 bytes from 10.33.33.2: icmp_seq=1 ttl=64 time=1.484 ms
    

    But containers are not:

     $ ping 172.18.0.2
    PING 172.18.0.2 (172.18.0.2): 56 data bytes
    Request timeout for icmp_seq 0
    Request timeout for icmp_seq 1
    

    The log does not show anything particularly interesting to me:

    DEBUG: (utun0) 2022/01/05 21:54:27 Setting up Wireguard on Docker Desktop VM
    {"status":"Pulling from chipmk/docker-mac-net-connect/setup","id":"latest"}
    {"status":"Digest: sha256:fcb4b57d27170baafdd52448f7a2a976f74e23e4c7bc4d63b0a36e8e51736ad7"}
    {"status":"Status: Image is up to date for ghcr.io/chipmk/docker-mac-net-connect/setup:latest"}
    Adding route for 172.17.0.0/16 -> utun0 (bridge)
    Adding route for 172.20.0.0/16 -> utun0 (event-backend_default)
    Adding route for 172.18.0.0/16 -> utun0 (hydra_hydra-default-network)
    Adding route for 172.19.0.0/16 -> utun0 (hydra_default)
    DEBUG: (utun0) 2022/01/05 21:54:28 Watching Docker events
    DEBUG: (utun0) 2022/01/05 21:54:28 peer(O9wa…y02M) - Received handshake initiation
    DEBUG: (utun0) 2022/01/05 21:54:28 peer(O9wa…y02M) - Sending handshake response
    DEBUG: (utun0) 2022/01/05 21:54:28 peer(O9wa…y02M) - Receiving keepalive packet
    DEBUG: (utun0) 2022/01/05 21:54:53 peer(O9wa…y02M) - Receiving keepalive packet
    

    Can you maybe give me a hint on debugging the issue? I am running Docker Desktop 4.3.2 (72729)

  • Doesn't work on M1 Mac

    Doesn't work on M1 Mac

    While it does work for me on Intel mac, it does not on M1 one. Log says that VM setup was done, but peer is not available:

    DEBUG: (utun10) 2021/12/29 15:50:21 Setting up Wireguard on Docker Desktop VM
    {"status":"Pulling from chipmk/docker-mac-net-connect/setup","id":"latest"}
    {"status":"Digest: sha256:8c44fc76845a4ba0eb18de835bec6d3b79089602ec10108e760d9b2a9ec6dfb6"}
    {"status":"Status: Image is up to date for ghcr.io/chipmk/docker-mac-net-connect/setup:latest"}
    Adding route for 172.17.0.0/16 -> utun10 (bridge)
    DEBUG: (utun10) 2021/12/29 15:50:22 Watching Docker events
    DEBUG: (utun10) 2021/12/29 15:51:50 peer(SPVw…xxkI) - Sending handshake initiation
    ERROR: (utun10) 2021/12/29 15:51:50 peer(SPVw…xxkI) - Failed to send handshake initiation: no known endpoint for peer
    

    On the VM the Wireguard config is empty:

    bash-5.0# wg
    interface: chip0
    bash-5.0# wg showconf chip0
    [Interface]
    
    
  • Could not add link chip0: operation not supported

    Could not add link chip0: operation not supported

    hi, my linux vm setup get in trouble

    some log

    DEBUG: (utun5) 2022/06/03 01:59:00 Setting up Wireguard on Docker Desktop VM
    Creating WireGuard interface chip0
    Could not add link chip0: operation not supported
    Assigning IP to WireGuard interface
    Configuring WireGuard device
    Failed to configure wireguard device: file does not exist
    Setup container complete
    

    https://github.com/chipmk/docker-mac-net-connect/blob/59f4bdb597df6e493cf3ccfc21eecedc548467ab/client/main.go#L86

    image

    software info

    OS: Monterey 12.3.1
    Docker Desktop 3.3.3
    

    Can you take a look? Looking forward to your reply,thanks

  • I followed the instructions, but I failed. Can you help me

    I followed the instructions, but I failed. Can you help me

    I'm sure I started it

    lafeier@lafeier-mac docker-projects % brew services start chipmk/tap/docker-mac-net-connect

    /Users/lafeier/Library/LaunchAgents/homebrew.mxcl.docker-mac-net-connect.plist: service already loaded
    Error: Failure while executing; `/bin/launchctl bootstrap gui/502 /Users/lafeier/Library/LaunchAgents/homebrew.mxcl.docker-mac-net-connect.plist` exited with 37.
    

    Get container IP

    lafeier@lafeier-mac docker-projects % docker inspect af01bf70c732|grep -i ipaddr

                "SecondaryIPAddresses": null,
                "IPAddress": "",
                        "IPAddress": "192.168.80.6",
    

    execute the ping

    lafeier@lafeier-mac docker-projects % ping 192.168.80.6

    PING 192.168.80.6 (192.168.80.6): 56 data bytes
    Request timeout for icmp_seq 0
    Request timeout for icmp_seq 1
    Request timeout for icmp_seq 2
    Request timeout for icmp_seq 3
    
  • Starting of brew service homebrew.mxcl.docker-mac-net-connect.plist fails

    Starting of brew service homebrew.mxcl.docker-mac-net-connect.plist fails

    Hi, @gregnr ! Thank you for wonderful brew package. I have some issue: it looks like the brew service couldn't start. image Here is my mac: image Also, I have checked logs file /usr/local/var/log/docker-mac-net-connect/std_error.log it is empty. Any suggestions here? Thanks.

  • IP Address command returns an empty string

    IP Address command returns an empty string

    Architecture: Apple M1 Pro

    Docker Compose file

    version: "3.7"
    
    services:
      d-transformer:
        depends_on:
          - metrics-exporter
        image: rudderlabs/rudder-transformer:latest 
    

    Command

    docker inspect rudder-server-d-transformer --format '{{.NetworkSettings.IPAddress}}'

    The command returns an empty IPAddress. Can anyone help me out with this on why this might be happening?

  • docker-mac-net-connect causes docker to crash

    docker-mac-net-connect causes docker to crash

    Summary

    I've been experiencing random crashes and have tried to figure out what the cause was. I noticed the crash happens when I refresh my site. Since uninstalling docker-mac-net-connect the problem has gone away, but it's not fair to say it was indeed the culprit and I would appreciate some assistance to replicate and find the cause.

    Logs

    Logs were captured with,

    pred='process matches ".*(ocker|vpnkit).*" || (process in {"taskgated-helper", "launchservicesd", "kernel"} && eventMessage contains[c] "docker")'
    /usr/bin/log stream --style syslog --level=error --color=always --predicate "$pred"
    
    2022-11-22 18:19:15.936205+1300  localhost docker-mac-net-connect[58147]: (libsystem_info.dylib) Created Activity ID: 0x3e350, Description: Retrieve User by ID
    2022-11-22 18:19:25.968400+1300  localhost docker-mac-net-connect[58163]: (libsystem_info.dylib) Created Activity ID: 0x3e4b0, Description: Retrieve User by ID
    2022-11-22 18:19:36.040428+1300  localhost docker-mac-net-connect[58181]: (libsystem_info.dylib) Created Activity ID: 0x3e520, Description: Retrieve User by ID
    2022-11-22 18:19:46.067790+1300  localhost docker-mac-net-connect[58202]: (libsystem_info.dylib) Created Activity ID: 0x3e5f0, Description: Retrieve User by ID
    2022-11-22 18:19:56.096402+1300  localhost docker-mac-net-connect[58212]: (libsystem_info.dylib) Created Activity ID: 0x3e780, Description: Retrieve User by ID
    2022-11-22 18:19:58.802823+1300  localhost kernel[0]: process com.docker.virtu[56893] caught waking the CPU 45001 times over ~136 seconds, averaging 329 wakes / second and violating a limit of 45000 wakes over 300 seconds.
    2022-11-22 18:20:06.125993+1300  localhost docker-mac-net-connect[58233]: (libsystem_info.dylib) Created Activity ID: 0x3e990, Description: Retrieve User by ID
    2022-11-22 18:20:12.658992+1300  localhost Docker Desktop[56866]: (SharedFileList) Created Activity ID: 0x3c915, Description: #SFLAPI LSSharedFileListCopySnapshot
    2022-11-22 18:20:16.155607+1300  localhost docker-mac-net-connect[58252]: (libsystem_info.dylib) Created Activity ID: 0x3eaa0, Description: Retrieve User by ID
    2022-11-22 18:20:26.189182+1300  localhost docker-mac-net-connect[58268]: (libsystem_info.dylib) Created Activity ID: 0x3ed60, Description: Retrieve User by ID
    2022-11-22 18:20:36.231122+1300  localhost docker-mac-net-connect[58291]: (libsystem_info.dylib) Created Activity ID: 0x3ef10, Description: Retrieve User by ID
    2022-11-22 18:20:46.272531+1300  localhost docker-mac-net-connect[58311]: (libsystem_info.dylib) Created Activity ID: 0x3efb0, Description: Retrieve User by ID
    2022-11-22 18:20:56.297009+1300  localhost docker-mac-net-connect[58322]: (libsystem_info.dylib) Created Activity ID: 0x3f010, Description: Retrieve User by ID
    2022-11-22 18:21:06.326764+1300  localhost docker-mac-net-connect[58347]: (libsystem_info.dylib) Created Activity ID: 0x3f270, Description: Retrieve User by ID
    2022-11-22 18:21:16.360662+1300  localhost docker-mac-net-connect[58367]: (libsystem_info.dylib) Created Activity ID: 0x3f5b0, Description: Retrieve User by ID
    2022-11-22 18:21:26.413362+1300  localhost docker-mac-net-connect[58380]: (libsystem_info.dylib) Created Activity ID: 0x3f6c0, Description: Retrieve User by ID
    2022-11-22 18:21:34.774691+1300  localhost Docker Desktop[56866]: (SharedFileList) Created Activity ID: 0x3c916, Description: #SFLAPI LSSharedFileListCopySnapshot
    2022-11-22 18:21:36.465112+1300  localhost docker-mac-net-connect[58399]: (libsystem_info.dylib) Created Activity ID: 0x3f9a0, Description: Retrieve User by ID
    2022-11-22 18:21:41.508277+1300  localhost Docker[56823]: (libquic.dylib) [com.apple.network:quic] quic_frame_write_CONNECTION_CLOSE [C1.1.1:2] [-d6d251cf16e1ae51] sending APPLICATION_CLOSE, code 0x100, reason <null>
    2022-11-22 18:21:41.508403+1300  localhost Docker[56823]: (libnetwork.dylib) [com.apple.network:connection] [C2 E56ECD0D-A056-4943-B6A5-2F8E85176722 IPv4#cdd5f451:443 quic-connection, url hash: b389560b, tls, definite, attribution: developer] cancel
    2022-11-22 18:21:41.508533+1300  localhost Docker[56823]: (libnetwork.dylib) [com.apple.network:connection] [C2 E56ECD0D-A056-4943-B6A5-2F8E85176722 IPv4#cdd5f451:443 quic-connection, url hash: b389560b, tls, definite, attribution: developer] cancelled
    	[C2 C42BC433-DE1C-48A8-88B6-6D6CECF2D359 10.56.193.226:64252<->IPv4#cdd5f451:443]
    	Connected Path: satisfied (Path is satisfied), viable, interface: en0, ipv4, dns
    	Duration: 240.512s, QUIC @0.001s took 0.000s, TLS 1.3 took 0.101s
    	bytes in/out: 7479/104105, packets in/out: 56/104, rtt: 0.046s, retransmitted bytes: 0, out-of-order bytes: 1131
    2022-11-22 18:21:41.508600+1300  localhost Docker[56823]: (libnetwork.dylib) [com.apple.network:connection] nw_flow_disconnected [C2 IPv4#cdd5f451:443 cancelled channel-flow ((null))] Output protocol disconnected
    2022-11-22 18:21:41.508627+1300  localhost Docker[56823]: (libnetwork.dylib) [com.apple.network:connection] nw_connection_report_state_with_handler_on_nw_queue [C2] reporting state cancelled
    2022-11-22 18:21:41.509045+1300  localhost Docker[56823]: (libnetwork.dylib) [com.apple.network:connection] nw_flow_disconnected [C1.1.1 IPv4#cdd5f451:443 ready channel-flow (satisfied (Path is satisfied), viable, interface: en0, ipv4, dns)] Output protocol disconnected
    2022-11-22 18:21:41.509111+1300  localhost Docker[56823]: (libnetwork.dylib) [com.apple.network:connection] nw_flow_disconnected [C1.1.1 IPv4#cdd5f451:443 ready channel-flow (satisfied (Path is satisfied), viable, interface: en0, ipv4, dns)] Output protocol disconnected
    2022-11-22 18:21:41.509689+1300  localhost Docker[56823]: (libnetwork.dylib) [com.apple.network:connection] nw_flow_disconnected [C2 IPv4#cdd5f451:443 cancelled channel-flow ((null))] Output protocol disconnected
    2022-11-22 18:21:41.509873+1300  localhost Docker[56823]: (libnetwork.dylib) [com.apple.network:connection] nw_flow_disconnected [C1.1.1 IPv4#cdd5f451:443 ready channel-flow (satisfied (Path is satisfied), viable, interface: en0, ipv4, dns)] Output protocol disconnected
    2022-11-22 18:21:41.509941+1300  localhost Docker[56823]: (libnetwork.dylib) [com.apple.network:connection] nw_flow_disconnected [C1.1.1 IPv4#cdd5f451:443 ready channel-flow (satisfied (Path is satisfied), viable, interface: en0, ipv4, dns)] Output protocol disconnected
    2022-11-22 18:21:41.510029+1300  localhost Docker[56823]: (libnetwork.dylib) [com.apple.network:connection] nw_flow_disconnected [C1.1.1 IPv4#cdd5f451:443 ready channel-flow (satisfied (Path is satisfied), viable, interface: en0, ipv4, dns)] Output protocol disconnected
    2022-11-22 18:21:41.510080+1300  localhost Docker[56823]: (libnetwork.dylib) [com.apple.network:connection] nw_flow_disconnected [C1.1.1 IPv4#cdd5f451:443 ready channel-flow (satisfied (Path is satisfied), viable, interface: en0, ipv4, dns)] Output protocol disconnected
    2022-11-22 18:21:41.510148+1300  localhost Docker[56823]: (libnetwork.dylib) [com.apple.network:connection] nw_flow_disconnected [C1.1.1 IPv4#cdd5f451:443 ready channel-flow (satisfied (Path is satisfied), viable, interface: en0, ipv4, dns)] Output protocol disconnected
    2022-11-22 18:21:41.510245+1300  localhost Docker[56823]: (libnetwork.dylib) [com.apple.network:connection] nw_flow_disconnected [C1.1.1 IPv4#cdd5f451:443 ready channel-flow (satisfied (Path is satisfied), viable, interface: en0, ipv4, dns)] Output protocol disconnected
    2022-11-22 18:21:41.510294+1300  localhost Docker[56823]: (libnetwork.dylib) [com.apple.network:connection] nw_flow_disconnected [C1.1.1 IPv4#cdd5f451:443 ready channel-flow (satisfied (Path is satisfied), viable, interface: en0, ipv4, dns)] Output protocol disconnected
    2022-11-22 18:21:41.510378+1300  localhost Docker[56823]: (libnetwork.dylib) [com.apple.network:connection] nw_flow_disconnected [C2 IPv4#cdd5f451:443 cancelled channel-flow ((null))] Output protocol disconnected
    2022-11-22 18:21:41.510467+1300  localhost Docker[56823]: (libnetwork.dylib) [com.apple.network:connection] nw_flow_disconnected [C1.1.1 IPv4#cdd5f451:443 ready channel-flow (satisfied (Path is satisfied), viable, interface: en0, ipv4, dns)] Output protocol disconnected
    2022-11-22 18:21:41.510533+1300  localhost Docker[56823]: (libnetwork.dylib) [com.apple.network:connection] nw_flow_disconnected [C1.1.1 IPv4#cdd5f451:443 ready channel-flow (satisfied (Path is satisfied), viable, interface: en0, ipv4, dns)] Output protocol disconnected
    2022-11-22 18:21:41.510595+1300  localhost Docker[56823]: (libnetwork.dylib) [com.apple.network:connection] nw_flow_disconnected [C1.1.1 IPv4#cdd5f451:443 ready channel-flow (satisfied (Path is satisfied), viable, interface: en0, ipv4, dns)] Output protocol disconnected
    2022-11-22 18:21:41.510647+1300  localhost Docker[56823]: (libnetwork.dylib) [com.apple.network:connection] nw_flow_disconnected [C1.1.1 IPv4#cdd5f451:443 ready channel-flow (satisfied (Path is satisfied), viable, interface: en0, ipv4, dns)] Output protocol disconnected
    2022-11-22 18:21:41.510715+1300  localhost Docker[56823]: (libnetwork.dylib) [com.apple.network:connection] nw_flow_disconnected [C1.1.1 IPv4#cdd5f451:443 ready channel-flow (satisfied (Path is satisfied), viable, interface: en0, ipv4, dns)] Output protocol disconnected
    2022-11-22 18:21:41.510774+1300  localhost Docker[56823]: (CFNetwork) Connection 1: cleaning up
    2022-11-22 18:21:41.510830+1300  localhost Docker[56823]: (libnetwork.dylib) [com.apple.network:connection] [C1 17C1B211-8085-43B6-8268-57A2C0F8988F Hostname#92189e72:443 quic-connection, url hash: b389560b, definite, attribution: developer] cancel
    2022-11-22 18:21:41.510912+1300  localhost Docker[56823]: (libnetwork.dylib) [com.apple.network:connection] [C1 17C1B211-8085-43B6-8268-57A2C0F8988F Hostname#92189e72:443 quic-connection, url hash: b389560b, definite, attribution: developer] cancelled
    	[C1.1.1 C42BC433-DE1C-48A8-88B6-6D6CECF2D359 10.56.193.226:64252<->IPv4#cdd5f451:443]
    	Connected Path: satisfied (Path is satisfied), viable, interface: en0, ipv4, dns
    	Privacy Stance: Not Eligible
    	Duration: 240.556s, DNS @0.000s took 0.039s, QUIC @0.041s took 0.103s
    	bytes in/out: 7479/104105, packets in/out: 56/104, rtt: 0.046s, retransmitted bytes: 0, out-of-order bytes: 1131
    2022-11-22 18:21:41.511039+1300  localhost Docker[56823]: (libnetwork.dylib) [com.apple.network:connection] nw_flow_disconnected [C1.1.1 IPv4#cdd5f451:443 cancelled channel-flow ((null))] Output protocol disconnected
    2022-11-22 18:21:41.511105+1300  localhost Docker[56823]: (libnetwork.dylib) [com.apple.network:connection] nw_connection_report_state_with_handler_on_nw_queue [C1] reporting state cancelled
    2022-11-22 18:21:43.406774+1300  localhost com.docker.backend[56824]: HTTP 30 CONNECT desktop.docker.com:443: successful (5 active requests)
    2022-11-22 18:21:43.418311+1300  localhost com.docker.backend[56824]: HTTP 22 CONNECT desktop.docker.com:443: successful (4 active requests)
    2022-11-22 18:21:46.492893+1300  localhost docker-mac-net-connect[58437]: (libsystem_info.dylib) Created Activity ID: 0x3fcb0, Description: Retrieve User by ID
    2022-11-22 18:21:56.541911+1300  localhost docker-mac-net-connect[58463]: (libsystem_info.dylib) Created Activity ID: 0x3ff10, Description: Retrieve User by ID
    2022-11-22 18:22:06.597528+1300  localhost docker-mac-net-connect[58481]: (libsystem_info.dylib) Created Activity ID: 0x3ffd0, Description: Retrieve User by ID
    2022-11-22 18:22:16.632752+1300  localhost docker-mac-net-connect[58499]: (libsystem_info.dylib) Created Activity ID: 0x40090, Description: Retrieve User by ID
    2022-11-22 18:22:26.671357+1300  localhost docker-mac-net-connect[58509]: (libsystem_info.dylib) Created Activity ID: 0x400c0, Description: Retrieve User by ID
    2022-11-22 18:22:36.708730+1300  localhost docker-mac-net-connect[58530]: (libsystem_info.dylib) Created Activity ID: 0x40200, Description: Retrieve User by ID
    2022-11-22 18:22:39.729944+1300  localhost kernel[0]: (AppleMobileFileIntegrity) AMFI: Denying core dump for pid 56867 (com.docker.vpnki)
    2022-11-22 18:22:39.729996+1300  localhost kernel[0]: com.docker.vpnkit[56867] Corpse allowed 1 of 5
    2022-11-22 18:22:39.730947+1300  localhost com.docker.backend[56824]: shutting down 6 tasks
    2022-11-22 18:22:39.730957+1300  localhost com.docker.backend[56824]: com.docker.vpnkit with pid: 56867 shutdown by signal: segmentation fault
    2022-11-22 18:22:39.731233+1300  localhost com.docker.backend[56824]: shutdown group 0/2: [docker with pid: 56868 com.docker.extensions with pid: 56872 com.docker.dev-envs with pid: 56875]
    2022-11-22 18:22:39.731620+1300  localhost com.docker.backend[56824]: sending signal terminated to docker with pid: 56868
    2022-11-22 18:22:39.731937+1300  localhost com.docker.backend[56824]: sending signal terminated to com.docker.extensions with pid: 56872
    2022-11-22 18:22:39.732146+1300  localhost com.docker.backend[56824]: sending signal terminated to com.docker.dev-envs with pid: 56875
    2022-11-22 18:22:39.734043+1300  localhost com.docker.backend[56824]: docker with pid: 56868 shutdown cleanly
    2022-11-22 18:22:39.734085+1300  localhost com.docker.backend[56824]: com.docker.dev-envs with pid: 56875 shutdown with exit code 1
    2022-11-22 18:22:39.734601+1300  localhost com.docker.backend[56824]: com.docker.extensions with pid: 56872 shutdown cleanly
    2022-11-22 18:22:39.833487+1300  localhost com.docker.backend[56824]: shutdown group 1/2: [com.docker.driver.amd64-linux with pid: 56870]
    2022-11-22 18:22:39.833734+1300  localhost com.docker.backend[56824]: sending signal terminated to com.docker.driver.amd64-linux with pid: 56870
    2022-11-22 18:22:39.834950+1300  localhost com.docker.backend[56824]: (17871a90) a362dc11-BackendAPI S<-C f5778ec1-DriverCMD POST /events[[STACK]]github.com/docker/pinata/common/pkg/backend.(*backendClient).PushEvent(0x14000617180, {0x1729d0a8af74b580, 0x0, {0x140003ca060, 0x21}, {0x100e61d87, 0x8}, {0x0, 0x0}, {0x0, ...}, ...})
    	github.com/docker/pinata/common/pkg/backend/notify.go:27 +0x120
    main.handleSystemCalls({0x10116d2b8, 0x1400006ee70})
    	github.com/docker/pinata/mac/backend/cmd/com.docker.driver.amd64-linux/main.go:484 +0x18c
    created by main.main
    	github.com/docker/pinata/mac/backend/cmd/com.docker.driver.amd64-linux/main.go:86 +0x5a8
    2022-11-22 18:22:39.835323+1300  localhost com.docker.backend[56824]: (17871a90) a362dc11-BackendAPI S<-C f5778ec1-DriverCMD bind: {"HasServerTimestamp":false,"content":"driver sent docker state stopping","docker":"stopping","timestamp":1669094559834224000}
    2022-11-22 18:22:39.835600+1300  localhost com.docker.backend[56824]: a362dc11-BackendAPI /engine/state --> [2022-11-22T18:22:39.834224000+13:00] (8d9855bb) engine stopping : driver sent docker state stopping
    2022-11-22 18:22:39.835679+1300  localhost com.docker.backend[56824]: (17871a90) a362dc11-BackendAPI S->C f5778ec1-DriverCMD POST /events (761.792µs): {"HasServerTimestamp":false,"content":"driver sent docker state stopping","docker":"stopping","timestamp":1669094559834224000}
    2022-11-22 18:22:39.876757+1300  localhost com.docker.backend[56824]: disconnected data connection: multiplexer is offline
    2022-11-22 18:22:39.876999+1300  localhost com.docker.backend[56824]: connection multiplexer has shutdown
    2022-11-22 18:22:39.877177+1300  localhost com.docker.backend[56824]: established connection to vpnkit-forwarder
    2022-11-22 18:22:39.877825+1300  localhost com.docker.backend[56824]: listening on unix:vpnkit.data.sock for data connection
    2022-11-22 18:22:39.878500+1300  localhost com.docker.backend[56824]: c1960eac-PauseHDL /pause/events <-- [2022-11-22T18:22:39.878396000+13:00] (ede161f6) ipc disconnected : <nil>
    2022-11-22 18:22:39.878886+1300  localhost com.docker.backend[56824]: Resyncer volumes/grpcfuse: while watching docker events: unexpected EOF
    2022-11-22 18:22:39.879179+1300  localhost com.docker.backend[56824]: Resyncer ports: while watching docker events: unexpected EOF
    2022-11-22 18:22:39.879376+1300  localhost com.docker.backend[56824]: NTP: disconnected connection
    2022-11-22 18:22:41.882351+1300  localhost com.docker.backend[56824]: c1960eac-PauseHDL /pause/events <-- [2022-11-22T18:22:41.880893000+13:00] (788ce11b) ipc connecting : <nil>
    2022-11-22 18:22:44.891570+1300  localhost com.docker.backend[56824]: (3c354267) a362dc11-BackendAPI S<-C f5778ec1-DriverCMD POST /usage[[STACK]]github.com/docker/pinata/common/pkg/backend.(*backendClient).UpdateUsage(0x14000617180, {{0x140000350b0, 0x14}, {0x0, 0x0}, {0x0, 0x0}, {0x0, 0x0}, 0x1})
    	github.com/docker/pinata/common/pkg/backend/client.go:494 +0xbc
    github.com/docker/pinata/common/pkg/proxy.(*BackendAnalytics).sendCommand(0x14000512480, {0x100e6290e, 0x9}, {0x100e5ebca, 0x6}, 0x1)
    	github.com/docker/pinata/common/pkg/proxy/analytics.go:104 +0xb4
    github.com/docker/pinata/common/pkg/proxy.(*BackendAnalytics).trackRouteForHTTPMethod(0x140006a1978?, 0x14000158200, 0x101166b98?, 0x10115c320)
    	github.com/docker/pinata/common/pkg/proxy/analytics.go:97 +0xc8
    github.com/docker/pinata/common/pkg/proxy.(*BackendAnalytics).Middleware.func1({0x1011661d0, 0x140002660e0}, 0x14000158200)
    	github.com/docker/pinata/common/pkg/proxy/analytics.go:59 +0xa8
    github.com/gorilla/mux.(*Router).ServeHTTP(0x140000ea000, {0x1011661d0, 0x140002660e0}, 0x140003ba000)
    	gith<decode: missing data>
    2022-11-22 18:22:44.891646+1300  localhost com.docker.backend[56824]: [...] ub.com/gorilla/[email protected]/mux.go:210 +0x19c
    2022-11-22 18:22:44.892047+1300  localhost com.docker.backend[56824]: (3c354267) a362dc11-BackendAPI S<-C f5778ec1-DriverCMD bind: {"command":"imagePullOthersLinux","count":1}
    2022-11-22 18:22:44.892319+1300  localhost com.docker.backend[56824]: (3c354267) a362dc11-BackendAPI S->C f5778ec1-DriverCMD POST /usage (1.139042ms): OK
    2022-11-22 18:22:44.894113+1300  localhost com.docker.backend[56824]: (02dbb90d) a362dc11-BackendAPI S<-C 35ead4ae-ProxyPKG GET /registry/access[[STACK]]github.com/docker/pinata/common/pkg/backend.(*backendClient).GetAccess(0x140000301e0)
    	github.com/docker/pinata/common/pkg/backend/client.go:336 +0x6c
    github.com/docker/pinata/common/pkg/proxy.(*ramPullApprover).Approve(0x0?, {{0x140006524e0, 0x7}, {0x0, 0x0}, {0x140006524e8, 0x6}, {0x140006524ef, 0x1c}, {0x140000780ca, ...}})
    	github.com/docker/pinata/common/pkg/proxy/pull.go:34 +0x50
    github.com/docker/pinata/common/pkg/proxy.(*proxyPullRewriter).RequestRewrite(0x140003453b0, 0x14000158200)
    	github.com/docker/pinata/common/pkg/proxy/pull.go:61 +0xc8
    github.com/docker/pinata/common/pkg/proxy.(*passthrough).doHandleHTTP(0x140000312c0, {0x101ade000?, 0x1400000e0c8}, {0x1011661d0?, 0x140002660e0}, 0x2?, {0x2?, 0x14000424038?, 0x10167b3a0?})
    	github.com/docker/pinata/common/pkg/proxy/passthrough.go:185 +0xc0
    github.com/docker/pinata/common/pkg/proxy.(*passthrough).HandleHTTP(0x140000312c0, {0x1011661d0, 0x14<decode: missing data>
    2022-11-22 18:22:44.894157+1300  localhost com.docker.backend[56824]: [...] 0002660e0}, 0x14000158200)
    	github.com/docker/pinata/common/pkg/proxy/passthrough.go:120 +0x32c
    github.com/docker/pinata/common/pkg/proxy.withError.func1({0x1011661d0, 0x140002660e0}, 0x140006a1538?)
    	github.com/docker/pinata/common/pkg/proxy/routes.go:16 +0x40
    github.com/docker/pinata/common/pkg/proxy.NewRouter.func2.1({0x1011661d0, 0x140002660e0}, 0x14000158200)
    	github.com/docker/pinata/common/pkg/proxy/proxy.go:108 +0x2dc
    github.com/docker/pinata/common/pkg/proxy.NewRouter.func1.1({0x1011661d0, 0x140002660e0}, 0x14000158200)
    	github.com/docker/pinata/common/pkg/proxy/proxy.go:77 +0x134
    github.com/docker/pinata/common/pkg/proxy.(*restrictions).Middleware.func1({0x1011661d0, 0x140002660e0}, 0x14000158200)
    	github.com/docker/pinata/common/pkg/proxy/restrictions.go:73 +0x120
    github.com/docker/pinata/common/pkg/proxy.(*BackendAnalytics).Middleware.func1({0x1011661d0, 0x140002660e0}, 0x14000158200)
    	github.com/docker/pinata/common/pkg/proxy/analytics.go:61 +0xc4
    github.com/gorilla/mu<…><decode: missing data>
    2022-11-22 18:22:44.894168+1300  localhost com.docker.backend[56824]: [...] Router).ServeHTTP(0x140000ea000, {0x1011661d0, 0x140002660e0}, 0x140003ba000)
    	github.com/gorilla/[email protected]/mux.go:210 +0x19c
    2022-11-22 18:22:44.895686+1300  localhost com.docker.backend[56824]: (02dbb90d) a362dc11-BackendAPI S->C 35ead4ae-ProxyPKG GET /registry/access (808µs): {"allowed":[{"DNS":"","IP":{"IP":"0.0.0.0","Mask":"AAAAAA=="},"Type":1,"value":"0.0.0.0/0"},{"DNS":".","IP":{"IP":"","Mask":null},"Type":3,"value":"."},{"DNS":"","IP":{"IP":"","Mask":null},"Type":0,"value":"10.0.0.0/8"},{"DNS":"","IP":{"IP":"","Mask":null},"Type":0,"value":"172.16.0.0/12"},{"DNS":"","IP":{"IP":"","Mask":null},"Type":0,"value":"192.168.0.0/16"},{"DNS":"","IP":{"IP":"","Mask":null},"Type":0,"value":"127.0.0.0/8"}],"enabled":false,"refresh_after":"2022-11-23T06:22:44.89438+13:00","refresh_grace_period_ends":"2022-11-23T18:22:44.89438+13:00","refresh_grace_period_interval":3600000000000}
    2022-11-22 18:22:46.734756+1300  localhost docker-mac-net-connect[58553]: (libsystem_info.dylib) Created Activity ID: 0x405b0, Description: Retrieve User by ID
    2022-11-22 18:22:47.012463+1300  localhost com.docker.virtualization[56893]: The guest OS stopped the virtual machine.
    2022-11-22 18:22:47.012719+1300  localhost com.docker.virtualization[56893]: VM shut down gracefully
    2022-11-22 18:22:47.012981+1300  localhost com.docker.virtualization[56893]: (CoreAnalytics) [com.apple.CoreAnalytics:client] Entering exit handler.
    2022-11-22 18:22:47.012995+1300  localhost com.docker.virtualization[56893]: (CoreAnalytics) [com.apple.CoreAnalytics:client] Exiting exit handler.
    2022-11-22 18:22:47.015884+1300  localhost com.docker.backend[56824]: (ee60cda6) a362dc11-BackendAPI S<-C f5778ec1-DriverCMD POST /events[[STACK]]github.com/docker/pinata/common/pkg/backend.(*backendClient).PushEvent(0x14000617180, {0x1729d0aa5b7071e8, 0x0, {0x14000612d80, 0x20}, {0x100e60d1e, 0x7}, {0x0, 0x0}, {0x0, ...}, ...})
    	github.com/docker/pinata/common/pkg/backend/notify.go:27 +0x120
    main.runVMAndBreakableGoroutines(0x14000134c80)
    	github.com/docker/pinata/mac/backend/cmd/com.docker.driver.amd64-linux/main.go:198 +0x508
    main.main()
    	github.com/docker/pinata/mac/backend/cmd/com.docker.driver.amd64-linux/main.go:117 +0x8f4
    2022-11-22 18:22:47.016306+1300  localhost com.docker.backend[56824]: (ee60cda6) a362dc11-BackendAPI S<-C f5778ec1-DriverCMD bind: {"HasServerTimestamp":false,"content":"driver sent docker state stopped","docker":"stopped","timestamp":1669094567014593000}
    2022-11-22 18:22:47.016676+1300  localhost com.docker.backend[56824]: (ee60cda6) a362dc11-BackendAPI S->C f5778ec1-DriverCMD POST /events (912.291µs): {"HasServerTimestamp":false,"content":"driver sent docker state stopped","docker":"stopped","timestamp":1669094567014593000}
    2022-11-22 18:22:47.016679+1300  localhost com.docker.backend[56824]: a362dc11-BackendAPI /engine/state --> [2022-11-22T18:22:47.014593000+13:00] (9958485c) engine stopped : driver sent docker state stopped
    2022-11-22 18:22:47.018393+1300  localhost com.docker.backend[56824]: com.docker.driver.amd64-linux with pid: 56870 shutdown cleanly
    2022-11-22 18:22:47.113839+1300  localhost com.docker.backend[56824]: shutdown group 2/2: [com.docker.vpnkit with pid: 56867 vpnkit-bridge with pid: 56869]
    2022-11-22 18:22:47.115152+1300  localhost com.docker.backend[56824]: sending signal terminated to vpnkit-bridge with pid: 56869
    2022-11-22 18:22:47.133738+1300  localhost com.docker.backend[56824]: vpnkit-bridge with pid: 56869 shutdown cleanly
    2022-11-22 18:22:47.218079+1300  localhost com.docker.backend[56824]: all 6 tasks shutdown
    2022-11-22 18:22:47.219255+1300  localhost com.docker.backend[56824]: supervise running backend processes: supervising tasks: task com.docker.vpnkit with pid: 56867 failed
    2022-11-22 18:22:56.773934+1300  localhost docker-mac-net-connect[59429]: (libsystem_info.dylib) Created Activity ID: 0x40b30, Description: Retrieve User by ID
    2022-11-22 18:23:06.831355+1300  localhost docker-mac-net-connect[59445]: (libsystem_info.dylib) Created Activity ID: 0x40db0, Description: Retrieve User by ID
    2022-11-22 18:23:11.950590+1300  localhost com.docker.backend[56824]: c1960eac-PauseHDL /pause/events server not replying: Get "http://ipc/pause/events": dial unix procd.sock: connect: no such file or directory
    2022-11-22 18:23:16.875998+1300  localhost docker-mac-net-connect[59462]: (libsystem_info.dylib) Created Activity ID: 0x41060, Description: Retrieve User by ID
    2022-11-22 18:23:26.931175+1300  localhost docker-mac-net-connect[60350]: (libsystem_info.dylib) Created Activity ID: 0x41160, Description: Retrieve User by ID
    2022-11-22 18:23:36.972083+1300  localhost docker-mac-net-connect[60360]: (libsystem_info.dylib) Created Activity ID: 0x411a0, Description: Retrieve User by ID
    2022-11-22 18:23:40.906527+1300  localhost Docker Desktop[56866]: (SharedFileList) Created Activity ID: 0x3c917, Description: #SFLAPI LSSharedFileListCopySnapshot
    2022-11-22 18:23:42.001552+1300  localhost com.docker.backend[56824]: c1960eac-PauseHDL /pause/events server not replying: Get "http://ipc/pause/events": dial unix procd.sock: connect: no such file or directory
    2022-11-22 18:23:47.023403+1300  localhost docker-mac-net-connect[60373]: (libsystem_info.dylib) Created Activity ID: 0x41250, Description: Retrieve User by ID
    2022-11-22 18:23:57.069655+1300  localhost docker-mac-net-connect[61243]: (libsystem_info.dylib) Created Activity ID: 0x41330, Description: Retrieve User by ID
    2022-11-22 18:24:07.140632+1300  localhost docker-mac-net-connect[61259]: (libsystem_info.dylib) Created Activity ID: 0x41500, Description: Retrieve User by ID
    2022-11-22 18:24:12.056796+1300  localhost com.docker.backend[56824]: c1960eac-PauseHDL /pause/events server not replying: Get "http://ipc/pause/events": dial unix procd.sock: connect: no such file or directory
    2022-11-22 18:24:17.189655+1300  localhost docker-mac-net-connect[61271]: (libsystem_info.dylib) Created Activity ID: 0x415c0, Description: Retrieve User by ID
    2022-11-22 18:24:27.242278+1300  localhost docker-mac-net-connect[62148]: (libsystem_info.dylib) Created Activity ID: 0x41780, Description: Retrieve User by ID
    2022-11-22 18:24:37.286440+1300  localhost docker-mac-net-connect[62159]: (libsystem_info.dylib) Created Activity ID: 0x418c0, Description: Retrieve User by ID
    2022-11-22 18:24:42.110542+1300  localhost com.docker.backend[56824]: c1960eac-PauseHDL /pause/events server not replying: Get "http://ipc/pause/events": dial unix procd.sock: connect: no such file or directory
    2022-11-22 18:24:47.330876+1300  localhost docker-mac-net-connect[62170]: (libsystem_info.dylib) Created Activity ID: 0x41920, Description: Retrieve User by ID
    2022-11-22 18:24:54.004577+1300  localhost com.docker.backend[56824]: could not lookup OS process' name: EOF
    2022-11-22 18:24:57.383929+1300  localhost docker-mac-net-connect[63033]: (libsystem_info.dylib) Created Activity ID: 0x419b0, Description: Retrieve User by ID
    

    Discussion

    When the crash occurs, this is the output I get around the same time,

    2022-11-22 18:22:39.729944+1300  localhost kernel[0]: (AppleMobileFileIntegrity) AMFI: Denying core dump for pid 56867 (com.docker.vpnki)
    2022-11-22 18:22:39.729996+1300  localhost kernel[0]: com.docker.vpnkit[56867] Corpse allowed 1 of 5
    

    Earlier I thought this was the culprit but upon replicating the problem there wasn't a crash afte this (as seen in logs above),

    2022-11-22 18:19:58.802823+1300  localhost kernel[0]: process com.docker.virtu[56893] caught waking the CPU 45001 times over ~136 seconds, averaging 329 wakes / second and violating a limit of 45000 wakes over 300 seconds.
    

    I was wondering is it a memory or CPU issue... I've given docker 32GB ram and 8 CPUs so I can't see how that could be the problem. My setup I've modified /etc/hosts to point a domain name to a docker running nginx listening on port 80, 443, 8003. I then forward from nginx to other dockers, doing TLS termination etc.

    
    upstream wsgi-server {
      server django-gunicorn:8000;
    }
    
    upstream asgi-server {
      server django-daphne:8000;
    }
    
    upstream vue-serve {
      server vue-serve:8003;
    }
    
    server {
        listen 80 default_server;
        server_name _;
        return 301 https://$host$request_uri;
    }
    
    server {
        listen 8000 default_server;
        listen 443 ssl;
        listen [::]:8000 default_server;
        listen [::]:443 ssl;
        server_name local.domainname.nz;
    
        ssl_certificate         /root/ssl/cert.pem;
        ssl_certificate_key     /root/ssl/key.pem;
    
        location /ws/ {
            proxy_pass http://asgi-server;
    
            proxy_read_timeout 86400;
    
            proxy_http_version 1.1;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection "upgrade";
            proxy_set_header Daphne-Root-Path "/ws";
            proxy_redirect off;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header X-Forwarded-Host $server_name;
            proxy_set_header X-Forwarded-Port 80;
        }
    
        client_max_body_size 5G;
    
        location /static/ {
            alias /static/;
        }
    
        location /media/ {
            alias /media/;
        }
    
        location / {
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header X-Forwarded-Host $server_name:$server_port;
            proxy_set_header X-Forwarded-Port $server_port;
            proxy_set_header X-Forwarded-Proto $scheme;
            proxy_pass http://wsgi-server;
        }
    
    }
    
    server {
        listen 8003 ssl;
    
        ssl_certificate         /root/ssl/cert.pem;
        ssl_certificate_key     /root/ssl/key.pem;
    
        location /sockjs-node/ {
            proxy_pass https://vue-serve;
    
            proxy_read_timeout 86400;
    
            proxy_http_version 1.1;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection "upgrade";
            proxy_redirect off;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header X-Forwarded-Host $server_name;
            proxy_set_header X-Forwarded-Port 8003;
        }
    
        location / {
            proxy_pass https://vue-serve;
        }
    }
    

    OS & Version Docker 4.14.1 (91661) MacOS Monterey 12.6

    Being able to bind dockers to different IPs is a great feature for local development when you're working accross a number of different projects, so I very much appreciate this project!

  • Doesn't work on M2 Mac

    Doesn't work on M2 Mac

    While it does work for me on M1, it does not on M2 one.

    I reinstalled package and restart service

    sudo brew services restart chipmk/tap/docker-mac-net-connect
    
    Warning: Taking root:admin ownership of some docker-mac-net-connect paths:
      /opt/homebrew/Cellar/docker-mac-net-connect/v0.1.2/bin
      /opt/homebrew/Cellar/docker-mac-net-connect/v0.1.2/bin/docker-mac-net-connect
      /opt/homebrew/opt/docker-mac-net-connect
      /opt/homebrew/opt/docker-mac-net-connect/bin
      /opt/homebrew/var/homebrew/linked/docker-mac-net-connect
    This will require manual removal of these paths using `sudo rm` on
    brew upgrade/reinstall/uninstall.
    Warning: docker-mac-net-connect must be run as non-root to start at user login!
    ==> Successfully started `docker-mac-net-connect` (label: homebrew.mxcl.docker-mac-net-connect)
    

    Services list

    brew services
    
    Name                   Status User File
    docker-mac-net-connect none   root
    

    After that I followed first example with nginx

    curl -I 172.17.0.2
    
    curl: (28) Failed to connect to 172.17.0.2 port 80 after 75012 ms: Operation timed out
    

    Am I doing something wrong?

  • Error: Failure while executing; `/opt/homebrew/bin/brew tap homebrew/services` exited with 1.

    Error: Failure while executing; `/opt/homebrew/bin/brew tap homebrew/services` exited with 1.

    ➜ ~ sudo brew services start chipmk/tap/docker-mac-net-connect Password: Error: Running Homebrew as root is extremely dangerous and no longer supported. As Homebrew does not drop privileges on installation you would be giving all build scripts full access to your system. Error: Failure while executing; /opt/homebrew/bin/brew tap homebrew/services exited with 1.

  • install error

    install error

    when i install,report "Error: No such file or directory @ rb_sysopen - /Users/peachestao/Library/Caches/Homebrew/downloads/c9f56865385d7a7687f15959433f3e4dfe0b82ccc48d68897fc4a2ff9595f68e--go-1.17.6.catalina.bottle.tar.gz"。

    please help me,thank you.

    env: macos 10.15.7

    Here are the details:

    ==> Downloading https://mirrors.ustc.edu.cn/homebrew-bottles/go-1.17.6.catalina.bottle.tar.gz
    #=#=#                                                                         
    curl: (22) The requested URL returned error: 404 
    Warning: Bottle missing, falling back to the default domain...
    ==> Downloading https://ghcr.io/v2/homebrew/core/go/manifests/1.17.6
    Already downloaded: /Users/peachestao/Library/Caches/Homebrew/downloads/5b57f962d64d554b5b211583da67a210451f1999835fc49dd1fa1b2ff349cb16--go-1.17.6.bottle_manifest.json
    ==> Downloading https://ghcr.io/v2/homebrew/core/go/blobs/sha256:f7a522d413b3b5fc47305a3851e0148a63b2786f22796399feb6788af92adb14
    Already downloaded: /Users/peachestao/Library/Caches/Homebrew/downloads/4d6c26a099f4ff438e81f0170db10eb13e3c3ae6540f291be331dd9a4056d636--go--1.17.6.catalina.bottle.tar.gz
    ==> Downloading https://github.com/chipmk/docker-mac-net-connect/archive/refs/tags/v0.1.2.tar.gz
    Already downloaded: /Users/peachestao/Library/Caches/Homebrew/downloads/be6ddea4c4a482e7843b5d9af1de1ea1fc218b83ea19a6b12b15081e2ce8983f--docker-mac-net-connect-0.1.2.tar.gz
    ==> Installing docker-mac-net-connect from chipmk/tap
    ==> Installing dependencies for chipmk/tap/docker-mac-net-connect: go
    ==> Installing chipmk/tap/docker-mac-net-connect dependency: go
    ==> Pouring go-1.17.6.catalina.bottle.tar.gz
    Error: No such file or directory @ rb_sysopen - /Users/peachestao/Library/Caches/Homebrew/downloads/c9f56865385d7a7687f15959433f3e4dfe0b82ccc48d68897fc4a2ff9595f68e--go-1.17.6.catalina.bottle.tar.gz```
  • Help making it work with colima

    Help making it work with colima

    Hello!

    I am using colima, to run x64 dockers in M1 (this is required for some components of our project).

    For an example only, I've performed these commands on my M1:

    brew install docker
    brew install colima
    colima start --arch x86_64 --cpu 4 --memory 6 --disk 20 --network-address --layer=true
    

    After this is done, I can create docker containers using the regular docker commands.

    To login within the colima machine, we can use:

    colima ssh
    

    I've checked and colima kernel have the wireguard support:

    root@colima:~# ip link add dev wg0 type wireguard
    root@colima:~# ip addr | grep wg0
    16: wg0: <POINTOPOINT,NOARP> mtu 1420 qdisc noop state DOWN group default qlen 1000
    

    From this point, what would be the best way to plug your tool with this environment?

  • Can you filter specific networks?

    Can you filter specific networks?

    Hello there. Thanks for this plugin, it's very useful. Is there a way to filter networks by name? I'm using this with minikube to expose the cluster and I'd like to only create a network interface for the docker network called minikube. Is that something that can be done, e.g. by setting envvars or a config file?

Docker4ssh: Docker containers and more via ssh

docker4ssh - docker containers and more via ssh docker4ssh is an ssh server that

Jun 2, 2022
A tool helps connect to your AriPods when sound playing in your Mac

Auto connect to airpods this tool helps connect to your AriPods when sound playing in your Mac. dependencenes SwitchAudioSource $ brew install switcha

Dec 9, 2021
MAC Address & Prefix Utility for Go

macaddr MAC Address & Prefix Utility for Go Installation go get -d github.com/thatmattlove/go-macaddr Usage Single MAC Address mac, err := macaddr.Pa

Feb 7, 2022
inlets-connect is a proxy that supports HTTPS and the CONNECT method

inlets-connect inlets-connect is a proxy that supports HTTPS and the CONNECT method. It can be deployed as a side-car or stand-alone to proxy to a sin

Nov 7, 2022
Minekube Connect allows you to connect any Minecraft server

Minekube Connect allows you to connect any Minecraft server, whether online mode, public, behind your protected home network or anywhere else in the world, with our highly available, performant and low latency edge proxies network nearest to you.

Dec 27, 2022
A small tool used to correspond to the IP address according to the name, id, and network alias of the docker container, which can be run as a DNS server

A small tool used to correspond to the IP address according to the name, id, and network alias of the docker container, which can be run as a DNS server

Apr 4, 2022
HCio is a straightforward way to ping Healthchecks.io checks directly from a Go application

HCio HCio is a straightforward way to ping Healthchecks.io checks directly from a Go application. Getting Started Create a simple Check: check := hcio

Nov 20, 2022
Library for directly interacting and controlling an Elgato Stream Deck on Linux.

Stream Deck Library for directly interacting and controlling an Elgato Stream Deck on Linux. This library is designed to take exclusive control over a

Dec 17, 2022
A rule based proxy For Mac base on Clash.
A rule based proxy For Mac base on Clash.

ClashX A rule based proxy For Mac base on Clash. ClashX 旨在提供一个简单轻量化的代理客户端,如果需要更多的定制化,可以考虑使用 CFW Mac 版 Features HTTP/HTTPS and SOCKS protocol Surge lik

Dec 26, 2022
protoc-gen-grpc-gateway-ts is a Typescript client generator for the grpc-gateway project. It generates idiomatic Typescript clients that connect the web frontend and golang backend fronted by grpc-gateway.

protoc-gen-grpc-gateway-ts protoc-gen-grpc-gateway-ts is a Typescript client generator for the grpc-gateway project. It generates idiomatic Typescript

Dec 19, 2022
connect to microsoft flight simulator 2020 using golang

msfs2020-go simconnect package msfs2020-go/simconnect connects to microsoft flight simulator 2020 using golang. cross-compiles from macos/linux, no ot

Nov 23, 2022
Connect your devices into a single private WireGuard®-based mesh network.

Wiretrustee A WireGuard®-based mesh network that connects your devices into a single private network. Why using Wiretrustee? Connect multiple devices

Dec 31, 2022
Connect to SagerNet in the LAN

SagerConnect Connect to SagerNet in the LAN (no configuration required) Usage Upgrade SagerNet to 0.4-rc02 or later Enable "Allow Connections from LAN

Jan 6, 2023
Small wrapper for containers/image which exposes a HTTP API to fetch

CLI to expose containers/image fetching via HTTP This is a small CLI program which vendors the containers/image Go library and exposes a HTTP API to f

Nov 1, 2021
Fail2Connect - Ban connections that fail to connect

Fail2Connect - Ban connections that fail to connect Fail2Connect is a program written in Golang. It reads log files like /var/log/openvpn.log or /var/

Jan 8, 2022
A tool for connect url write by Golang
A tool for connect url write by Golang

goURL A tool for connect url write by Golang To-Do In this month (2021.11), our development plan is adding the following functions: -X, a flag to choo

Nov 8, 2021
This app brings the Matterbridge binary to your server to connect Nextcloud Talk with other chat services

This app brings the Matterbridge binary to your server to connect Nextcloud Talk with other chat services

Sep 12, 2022
Connect a Minecraft Forge server to Matterbridge

Mattercraft Mattercraft is a Minecraft Forge mod that relays chat messages between a Minecraft server and Matterbridge. It uses Matterbridge's HTTP AP

Jul 28, 2022
Connect Discourse threads to Matterbridge

Matterbabble Matterbabble is an API client for Discourse and Matterbridge. It mirrors Discourse posts in a topic to Matterbridge messages on a gateway

Dec 7, 2022