Services on the same Compose network cannot resolve service names
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 42/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 冷清
- 技术栈
- swift
- 领域
- networking
调研方向
Start by reading the Compose network setup and service startup paths in container-compose, then check the linked apple/container issue #856 to learn whether DNS support is available upstream. Reproduce with the supplied two-service Compose file and inspect how services join appnet. Done means service-name lookup works on a shared network, or the upstream limitation and dependency are clearly documented.
由索引模型根据 Issue 内容生成。
描述
Summary
Services started by container-compose cannot resolve each other by Compose service name, even when they are on the same Compose network. IP connectivity works, but DNS lookup for the service name returns NXDOMAIN.
This may depend on an upstream apple/container DNS capability, but it is worth tracking here because it is a core Compose compatibility blocker.
Related upstream issue: https://github.com/apple/container/issues/856
Environment
- OS: macOS 26.5.1 (25F80)
- Xcode: 26.5 (17F42)
- container: 1.0.0 (release, commit ee848e3)
- container-compose: 1.0.0 installed via Homebrew
- Architecture: arm64
Reproduction
compose.yml:
services:
web:
image: nginx:alpine
networks:
- appnet
probe:
image: busybox:latest
depends_on:
- web
networks:
- appnet
command: ["sh", "-c", "wget -qO- http://web"]
networks:
appnet:
Run:
container system start
container-compose --file compose.yml up -d
container logs network-probe
Actual behavior
The probe service exits with:
wget: bad address 'web'
The services are attached to the custom network and IP connectivity works:
container inspect network-web
# network-web has 192.168.65.2/24 on appnet
container run --rm --network appnet busybox:latest wget -qO- http://192.168.65.2
# returns nginx welcome page
But DNS lookup fails:
container run --rm --network appnet busybox:latest nslookup network-web
container run --rm --network appnet busybox:latest nslookup web
Both return NXDOMAIN.
Expected behavior
Services on the same Compose network should be reachable by Compose service name, e.g. http://web, and eventually by configured network aliases.
If this requires upstream support from apple/container, container-compose should ideally document the limitation and track the dependency. If a workaround is possible in container-compose, service-name discovery is the most important Compose compatibility gap to close.
- 主要语言
- Swift
- 星标
- 1k
- 派生
- 61
- 平均合并
- 2 天 4 小时
- 30 天内合并 PR
- 17
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
Mcrich23/Container-Compose 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 64/100
Mcrich23/Container-Compose#197 ·
维护者通常 1 天内回复
-
SIGINT/SIGTERM ignored during startup phase & healthcheck wait in foreground up可能已有人在做 @georgettica 于 27 天前认领。 未关闭
Mcrich23/Container-Compose#165 · 5 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
-
难度 5/5 一周以上 新手友好度 35/100
Mcrich23/Container-Compose#137 · 1 条评论 ·
维护者通常 1 天内回复
-
DecodingError.typeMismatch in build args可能重新可做 关联的 PR 已关闭且未合并。 未关闭
难度 3/5 1-2 天 新手友好度 25/100
Mcrich23/Container-Compose#136 · 1 条评论 · 2 个 reaction ·
维护者通常 1 天内回复
-
Containers launch sequentially - can they be launched concurrently?可能重新可做 关联的 PR 已关闭且未合并。 未关闭
难度 4/5 3-5 天 新手友好度 25/100
Mcrich23/Container-Compose#128 · 1 条评论 · 1 个 reaction ·
维护者通常 1 天内回复
查看 Mcrich23/Container-Compose 的全部 Issue
相似的 Issue
-
milestone-3
难度 2/5 1-3 小时 新手友好度 78/100
Harsha0912/recall#71 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 85/100
meshtastic/Meshtastic-Apple#3132 ·
维护者通常 1 天内回复
-
approved
难度 2/5 1-3 小时 新手友好度 68/100
-
难度 2/5 1-3 小时 新手友好度 66/100
MonitorControl/MonitorControl#1949 ·
-
Bug
难度 1/5 1 小时以内 新手友好度 91/100