首页 > 解决方案 > 命令“/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

提前致谢

标签: pythonmongodbdockerdockerfile

解决方案


推荐阅读