简体   繁体   English

Docker 为 Ubuntu 20.04 构建失败

[英]Docker build for Ubuntu 20.04 is failing

We were using an old ubuntu docker image in past and I am trying to update it to use Ubuntu 20.04.我们过去使用的是旧的 ubuntu docker 图像,我正在尝试更新它以使用 Ubuntu 20.04。 I am getting the following error while building the image:构建映像时出现以下错误:

2022-01-07T12:38:09.467-08:00   Step 1/25 : FROM ubuntu:20.04
2022-01-07T12:38:09.467-08:00   20.04: Pulling from library/ubuntu
2022-01-07T12:38:09.467-08:00   toomanyrequests: You have reached your pull rate limit. You may increase the limit by authenticating and upgrading: https://www.docker.com/increase-rate-limit 

We did not face this issue earlier when we were building image using older Ubuntu versions.当我们使用较旧的 Ubuntu 版本构建映像时,我们之前没有遇到过这个问题。

I am quite new to docker.我对 docker 很陌生。 Following is the starting of my docker file:以下是我的 docker 文件的开头:

FROM ubuntu:20.04

ENV DOCKER_BUCKET="download.docker.com" \
    DOCKER_VERSION="17.09.0-ce" \
    DOCKER_CHANNEL="stable" \
    DOCKER_SHA256="1323443242" \
    DIND_COMMIT="42432322" \
    DOCKER_COMPOSE_VERSION="1.21.2" \
    GITVERSION_VERSION="3.6.5" \
    DEBIAN_FRONTEND="noninteractive"

Any help on how can I resolve this issue?有关如何解决此问题的任何帮助?

PS - we build and then push this image to Amazon ECR. PS - 我们构建此映像,然后将其推送到 Amazon ECR。

It seems like you cannot build your docker image due to rate limits, if you wait an six hours, you should be able to build again.由于速率限制,您似乎无法构建 docker 映像,如果您等待六个小时,您应该能够再次构建。

So either login to dockerhub and make an account or switch to a vpn to pull.因此,要么登录 dockerhub 并创建一个帐户,要么切换到 vpn 进行拉取。

https://developers.redhat.com/blog/2021/02/18/how-to-work-around-dockers-new-download-rate-limit-on-red-hat-openshift#:~:text=The%20company%20now%20has%20a,from%20a%20single%20IP%20address . https://developers.redhat.com/blog/2021/02/18/how-to-work-around-dockers-new-download-rate-limit-on-red-hat-openshift#:~:text=The %20company%20now%20has%20a,from%20a%20single%20IP%20address

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM