Loading... # Mac Cannot PING Docker Containers ## 1) docker-connector images (Old Way) ```bash bash > brew install wenjunxiao/brew/docker-connector bash > vi /usr/local/etc/docker-connector.conf # route 192.168.240.0/24 expose bash > sudo brew services start docker-connector bash > brew services list bash > docker run -it -d --restart always --net host --cap-add NET_ADMIN --name connector wenjunxiao/mac-docker-connector ``` ### docker-compose.yml sample ```yaml version: '3.0' networks: network: ipam: config: - subnet: 192.168.240.0/24 services: redis: image: redis:alpine restart: on-failure container_name: redis environment: - REDIS_REPLICATION_MODE=master networks: network: ipv4_address: 192.168.240.25 ``` ### PING Testing ```bash bash > ping 192.168.240.25 ``` ## 2) orbstack Instead Of docker-For-Mac > open in browser directly © Reprint prohibited Support Appreciate the author AliPayWeChat Like If you think my article is useful to you, please feel free to appreciate