首页 > 解决方案 > 如何修复 dockerized apt-cacher-ng 服务只听 IPv6

问题描述

跟进Need help dockerize an apt-cacher-ng service,其中一个问题是,虽然我的 apt-cacher-ng 服务已启动并正在运行,但它只监听 IPv6:

$ netstat -tanp  | grep 3142
(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
tcp6       0      0 :::3142                 :::*                    LISTEN      -

再次,我正在关注

Dockerize 一个 apt-cacher-ng 服务
https://docs.docker.com/engine/examples/apt-cacher-ng/

该文档是否缺少某些内容?
(我从文档中更改的唯一内容是将“FROM”基础替换为ubuntuto debian:sid

标签: dockerubuntudebian

解决方案


实际上,您的服务也在侦听 IPv4 接口。输出中的IPv6 监听netstat是一个组合问题netstatdocker-proxy. 请参阅问题Make docker use IPv4 for port binding中的更多详细信息


推荐阅读