host.docker.internal not resolving
Describe the bug 请详细描述问题(ZH_CN) A clear and concise description of what the bug is. when using redroid as a local dev emulator. using extra_hosts to connect to the hosts localhost doesnt resolve
make sure the required kernel modules present 确保必须的内核功能已开启(ZH_CN)
- [x]
grep binder /proc/filesystems - [ ]
grep ashmem /proc/misc(optional)
Collect debug logs 收集调试日志(ZH_CN)
[CONTAINER]` omit CONTAINER if not exist any more. 如容器已退出,可忽略CONTAINER参数(ZH_CN)
name: redroid
services:
redroid:
stdin_open: true
tty: true
privileged: true
ports:
- 5555:5555
pull_policy: always
volumes:
- ~/data:/data
image: redroid/redroid:12.0.0_64only-latest
command: ro.secure=0 androidboot.redroid_gpu_mode=auto
extra_hosts:
- "host.docker.internal:host-gateway"
host os: arch linux docker -v Docker version 28.0.4, build b8034c0ed7
Screenshots 截图(ZH_CN) If applicable, add screenshots to help explain your problem.
我也遇到了,安卓容器,或者至少基于类似 redroid 的安卓容器,都有这个问题。而且这个问题还不仅是 extra_hosts。你通过 service 的名字访问其他容器也是无法解析的,进而不能路由,不知道安卓搞了什么东西。
i got same problem too, cannot connect with host machine