python - 命令“/bin/sh -c apt-get update”返回非零代码:docker 文件中的 100
问题描述
我的 DockerFile 如下:
FROM python:3.6
RUN wget -qO - https://www.mongodb.org/static/pgp/server-4.2.asc | apt-key add -
RUN echo "deb [ arch=amd64 ] https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.2 multiverse" | tee /etc/apt/sources.list.d/mongodb-org-4.2.list
RUN apt-get update
RUN apt-get install -y mongodb-org
ADD . /app
WORKDIR /app
RUN pip install -r requirements.txt
RUN mongod --fork --config /etc/mongod.conf
EXPOSE 9000
apt-get update
出现错误时:
Reading package lists...
E: Failed to fetch http://cdn-fastly.deb.debian.org/debian/dists/buster/main/binary-amd64/by-hash/SHA256/6233101b7f58c6cf71fe1cd46b962cf358fc5626ed8cb94201f5e0e939e91d73 Connection failed [IP: 151.101.36.204 80]
E: Some index files failed to download. They have been ignored, or old ones used instead.
The command '/bin/sh -c apt-get update' returned a non-zero code: 100
提前致谢
解决方案
推荐阅读
- python - Python Selenium 多线程问题
- c++ - 如果输入大小已知,std::unordered_map 如何优化批量插入
- javascript - 有没有办法用双引号字符串设置javascript变量值?
- excel - 在 excel 中读取表格数组作为范围是否有限制?
- c# - 如何从给定的开始日期获取 N 周内特定工作日的日期
- c# - C# 中的 API 调用 - 使用用户名和密码获取调用
- photoshop-script - 将文本图层与另一个参考图层的中心对齐的脚本
- c++ - 使用 SetWindowText 时 win32 gui 文本框上的换行符
- java - 如何使用 Selenide 等待 HTML 元素全局出现?
- python - 将字符串转换为python中列表的整数时,base 10错误的无效文字