Docker访问宿主机网络
date
May 16, 2022
slug
tip-docker-access-host-ip
status
Published
summary
小技巧
tags
tip
docker
type
Post
URL
Problem & Summary
Solution
Linux
docker network create -d bridge --subnet 192.168.99.0/24 --gateway 192.168.99.1 localNet
docker exec -it speedtest ping 192.168.99.1
Mac / Windows
# 对于mac和windows,可以使用
host.docker.internal
# 替换127.0.0.1