问答详情
源自:-

docker ubuntu apt-get does not file

docker ubuntu apt-get does not file


W: The repository 'http://mirrors.163.com/debian jessie Release' does not have a Release file.

W: The repository 'http://mirrors.163.com/debian jessie-updates Release' does not have a Release file.

W: The repository 'http://mirrors.163.com/debian-security jessie/updates Release' does not have a Release file.

E: Failed to fetch http://mirrors.163.com/debian/dists/jessie/main/binary-amd64/Packages  404

E: Failed to fetch http://mirrors.163.com/debian/dists/jessie-updates/main/binary-amd64/Packages  404

E: Failed to fetch http://mirrors.163.com/debian-security/dists/jessie/updates/main/binary-amd64/Packages  404

E: Some index files failed to download. They have been ignored, or old ones used instead.


提问者:Eric429221 2018-04-12 14:12

个回答

  • Eric429221
    2018-04-13 15:38:40

    FROM ubuntu

    MAINTAINER xbf

    RUN sed -i 's/archive.ubuntu.com/mirrors.ustc.edu.cn/g' /etc/apt/sources.list

    RUN sed -i'' 's/archive\.ubuntu\.com/us\.archive\.ubuntu\.com/' /etc/apt/sources.list

    RUN apt-get -m update

    RUN apt-get install -y nginx

    COPY index.html /var/www/html

    ENTRYPOINT ["/usr/sbin/nginx", "-g", "daemon off:"]

    EXPOSE 80

    https://img3.mukewang.com/5ad05e7e0001070509560394.jpg

  • Eric429221
    2018-04-12 16:22:17

    我目前使用的主機是騰訊雲 ubuntu 16.04

  • guojinyun
    2018-04-12 16:03:05

    你的网络问题吧  你要不别用这个apt的镜像了  用个阿里或者163的试试  你这个dockerfile 没错  我可以构建成功 

  • Eric429221
    2018-04-12 15:25:00

    FROM ubuntu

    MAINTAINER xbf

    RUN sed -i 's/archive.ubuntu.com/mirrors.ustc.edu.cn/g' /etc/apt/sources.list

    RUN apt-get -m update

    RUN apt-get install -y nginx

    COPY index.html /var/www/html

    ENTRYPOINT ["/usr/sbin/nginx", "-g", "daemon off:"]

    EXPOSE 80


    我再跑這個的時候發生這個問題,不知道為啥

  • guojinyun
    2018-04-12 14:25:13

    安装之前要先进行更新,apt-get update ,如果你更新过了,可能是网络不好吧,所以没有更新成功