Docker-Compose 是否允许在使用扩展时覆盖端口?

Does Docker-Compose allow overwriting of ports when using extends?

见标题。根据 docs:

For the multi-value options ports, expose, external_links, dns, dns_search, and tmpfs, Compose concatenates both sets of values:

有什么办法可以改变这种行为吗?我有一个由多个其他条目扩展的条目,除了其中一个条目外,所有条目都使用相同的端口。但是最后一个需要使用不同的端口,这意味着它应该替换端口。

有什么办法可以做到吗?

正如您在此处看到的那样 (https://github.com/docker/compose/issues/2260),这是 compose 的未解决问题。