Google Container Registry和Docker生態系統的新增功能。我將現有圖像推送到gcr.io,我希望完成任務的時間接近0秒,因爲所有位都已經在gcr.io上。上下文是在雲中運行開發代碼,同時在很多內核上運行,與我的Mac筆記本電腦具有的4個內核相反。我正在運行一個無操作來隔離瓶頸,真正的用法大約有6M新字節。這是緩慢的,執行無操作14秒。有沒有辦法將這個無用操作減少到不到一秒?「gcloud碼頭推送」的速度
$ time gcloud docker push gcr.io/ai2-general/euclid:latest
WARNING: login credentials saved in /Users/cristipp/.docker/config.json
Login Succeeded
WARNING: login credentials saved in /Users/cristipp/.docker/config.json
Login Succeeded
WARNING: login credentials saved in /Users/cristipp/.docker/config.json
Login Succeeded
WARNING: login credentials saved in /Users/cristipp/.docker/config.json
Login Succeeded
WARNING: login credentials saved in /Users/cristipp/.docker/config.json
Login Succeeded
WARNING: login credentials saved in /Users/cristipp/.docker/config.json
Login Succeeded
WARNING: login credentials saved in /Users/cristipp/.docker/config.json
Login Succeeded
The push refers to a repository [gcr.io/ai2-general/euclid]
3a67b2b013f5: Layer already exists
b7c8985fbf02: Layer already exists
fef418d1a9e8: Layer already exists
c58360ce048c: Layer already exists
0030e912789f: Layer already exists
5f70bf18a086: Layer already exists
0ece0aa9121d: Layer already exists
ef63204109e7: Layer already exists
694ead1cbb4d: Layer already exists
591569fa6c34: Layer already exists
998608e2fcd4: Layer already exists
c12ecfd4861d: Layer already exists
latest: digest: sha256:04a831f4bf3e3033c40eaf424e447dd173e233329440a3c9796bf1515225546a size: 10321
real 0m14.742s
user 0m0.622s
sys 0m0.181s
14秒很長時間。使用普通的docker push
更快,但仍浪費5個寶貴的時間。
$ time docker push gcr.io/ai2-general/euclid:latest
The push refers to a repository [gcr.io/ai2-general/euclid]
3a67b2b013f5: Layer already exists
b7c8985fbf02: Layer already exists
fef418d1a9e8: Layer already exists
c58360ce048c: Layer already exists
0030e912789f: Layer already exists
5f70bf18a086: Layer already exists
0ece0aa9121d: Layer already exists
ef63204109e7: Layer already exists
694ead1cbb4d: Layer already exists
591569fa6c34: Layer already exists
998608e2fcd4: Layer already exists
c12ecfd4861d: Layer already exists
latest: digest: sha256:04a831f4bf3e3033c40eaf424e447dd173e233329440a3c9796bf1515225546a size: 10321
real 0m5.014s
user 0m0.030s
sys 0m0.011s
我懷疑的差異是由7次的登錄嘗試,這需要一段時間來處理造成的,後來感覺就像搬運工推開銷。
參考:
$ gcloud --version
Google Cloud SDK 107.0.0
bq 2.0.24
bq-nix 2.0.24
core 2016.04.21
core-nix 2016.03.28
gcloud
gsutil 4.19
gsutil-nix 4.18
kubectl
kubectl-darwin-x86_64 1.2.2
您是否設法找到了解決方案?我也有7次登錄嘗試(我的錯誤信息有點不同'警告:' - 電子郵件'已被棄用,它很快就會被移除。'「 –
感謝您的報告,你正在經歷我們正在積極研究這個問題 –
@KennyLeung我也經歷過這個問題,即使從gcloud web控制檯構建和推送,理論上gcloud web控制檯與gcr主機位於同一區域。 – joshwa