簡體   English   中英

使用適用於 Python 的 Docker API 時出現“URL 超出最大重試次數:/v1.35/containers/create”錯誤

[英]Getting "Max retries exceeded with URL: /v1.35/containers/create" error when using the Docker API for Python

我正在嘗試使用 Python 的 Docker 包啟動 docker 映像並收到以下錯誤:

Getting "Max retries exceeded with URL: /v1.35/containers/create" error when using the Docker API for Python

這是我運行的命令:

    self.container = self.docker_connector_client.container_run\
        (image="jenkins", version="latest", ports={'8080': '8081'})

Docker 守護進程在 VM 的 3389 端口上運行,我絕對可以看到它正在那里運行。

當我運行 curl://localhost:3389 時,我看到了響應。 但是從其他任何地方卷曲我都會出錯。

VM 本身在 GCP 上運行,所以那里可能存在一些路由問題,但我看不到那里有任何問題。 謝謝!

正如@Pavel Zagalsky 證實的那樣,用於 Python 的 Docker API 沒有問題:

問題是我用來運行代碼的 VM 映像在啟動腳本中有防火牆。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM