docker 编写构建和启动超时

docker compose building and starting timeout

我已经使用 docker compose 一段时间了,但今天它第一次给我这个错误,当我想开始或构建我的 compose 时:

An HTTP request took too long to complete. Retry with --verbose to obtain debug information. If you encounter this issue regularly because of slow network conditions, consider setting COMPOSE_HTTP_TIMEOUT to a higher value (current value: 60).

为什么会这样? 我发现了与我类似的问题,但他们的解决方案对我不起作用。我尝试重新启动我的 docker 甚至删除图像和容器,但我仍然收到此错误。 我的 docker 撰写也不包含 tty 变量。

COMPOSE_HTTP_TIMEOUT=300 docker-compose up -d

请参阅 Compose CLI environment variables 了解完整详情。