docker - 如何修复 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”基础替换为ubuntu
to debian:sid
)
解决方案
实际上,您的服务也在侦听 IPv4 接口。输出中的IPv6 监听netstat
是一个组合问题netstat
和docker-proxy
. 请参阅问题Make docker use IPv4 for port binding中的更多详细信息
推荐阅读
- postgresql - db后端PostgreSQL异步处理(处理查询时在db中做其他配置但不影响处理效率)
- user-input - 用户输入字段中的文本对齐光标问题(WIX 站点)
- java - 如何修复“libsDir 方法已被弃用”。什么时候不使用?
- html - 后备图标
- r - 合并两个表但保留两个值
- db2 - Db2 将表空间从备份还原到新数据库或现有数据库中的其他模式
- php - 方法“loadFactoriesFrom”已弃用
- php - 表情符号显示黑白(windows7 chrome、edge)
- node.js - 节点js Ubuntu中的getaddrinfo EAI_AGAIN
- php - 我的 PHP 表单对垃圾邮件发送者和黑客安全吗?