“码头工”无法生成。拉映像没有问题,但当尝试运行命令时(如“”)会失败。只有在docker-come.yml中添加"network: host“,才能进行构建。无论如何,这并不能解决我的问题,因为发送GET请求的任何凌乱状态都会随着超时而失败。不知道该怎么做。同样的问题发生在Ubuntu 22和Manjaro 21。
生成错误:
=> [6/9] RUN pip install --upgrade pip 85.7s
=> => # Requirement already satisfied: pip in /usr/local/lib/python3.9/site-packages (22.0.4)
=> => # WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.HT
=> => # TPSConnection object at 0x7f3f75f13340>, 'Connection to pypi.org timed out. (connect timeout=15)')': /simple/pip/请求错误:
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='google.com', port=443): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7fccaa7afdc0>: Failed to establish a new connection: [Errno 110] Connection timed out'))发布于 2022-11-25 11:36:38
您可以创建具有定义子网的自定义网络:
version: '3'
services:
web:
build:
context: .
network: custom_network
networks:
custom_network:
ipam:
driver: default
config:
- subnet: "192.168.100.1/28"试试这个,我希望这能帮上忙。
https://stackoverflow.com/questions/73803750
复制相似问题