docker ubuntu apt-get does not file

来源:-

Eric429221

2018-04-12 14:12

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.


写回答 关注

5回答

  • 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

    guojin...

    你的网络有问题啊, uupdate 更新不了啊

    2018-04-13 16:08:57

    共 1 条回复 >

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

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

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

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

    guojin... 回复Eric42...

    修改成163的不好用 就换一个试试 我这边构建没有出现这个问题呢

    2018-04-12 16:58:51

    共 2 条回复 >

  • 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 ,如果你更新过了,可能是网络不好吧,所以没有更新成功

Docker入门

再不学点Docker你就out啦!

96713 学习 · 242 问题

查看课程

相似问题