apt-get update' returned a non-zero code: 100

前端 未结 3 1852
一生所求
一生所求 2020-12-05 06:25

I am trying to create a docker image from my docker file which has following contains

FROM ubuntu:14.04.4
RUN echo \'deb http://private-repo-1.hortonworks.co         


        
相关标签:
3条回答
  • 2020-12-05 06:47

    I had the same problem, solved it thanks to this answer :

    https://superuser.com/questions/1423486/issue-with-fetching-http-deb-debian-org-debian-dists-jessie-updates-inrelease/1424377

    You may want to add this line

    RUN printf "deb http://archive.debian.org/debian/ jessie main\ndeb-src http://archive.debian.org/debian/ jessie main\ndeb http://security.debian.org jessie/updates main\ndeb-src http://security.debian.org jessie/updates main" > /etc/apt/sources.list
    

    before any apt-get command in the Dockerfile.

    0 讨论(0)
  • 2020-12-05 06:53

    I had to clean up my disk with docker system prune, I did it because I read about it on this other SO answer

    0 讨论(0)
  • 2020-12-05 06:55

    Because you have an https sources. Install apt-transport-https before executing update.

    FROM ubuntu:14.04.4
    RUN apt-get update && apt-get install -y apt-transport-https
    RUN echo 'deb http://private-repo-1.hortonworks.com/HDP/ubuntu14/2.x/updates/2.4.2.0 HDP main' >> /etc/apt/sources.list.d/HDP.list
    RUN echo 'deb http://private-repo-1.hortonworks.com/HDP-UTILS-1.1.0.20/repos/ubuntu14 HDP-UTILS main'  >> /etc/apt/sources.list.d/HDP.list
    RUN echo 'deb [arch=amd64] https://apt-mo.trafficmanager.net/repos/azurecore/ trusty main' >> /etc/apt/sources.list.d/azure-public-trusty.list
    
    ....
    Rest of your Dockerfile.
    
    0 讨论(0)
提交回复
热议问题