In Docker, apt-get install fails with “Failed to fetch http://archive.ubuntu.com/ … 404 Not Found” errors. Why? How can we get past it?

后端 未结 5 909
轻奢々
轻奢々 2020-12-13 05:46

My team uses Docker (with ubuntu:14.04 base image) for local development and we often have to rebuild some or all of our images. But we often get failures downl

5条回答
  •  一个人的身影
    2020-12-13 06:30

    In my case the problem was caused by the parent image since it had not cleared the apt cache properly.

    I solve the problem including cleaning commands before the first apt update ...

    RUN apt clean && \
        rm -rf /var/lib/apt/lists/* && \
        apt update && \
        ...
    

    Hope this helps

提交回复
热议问题