无法连接到archive.ubuntu.com:http:

时间:2019-06-28 05:17:27

标签: java docker ubuntu tomcat

我用Ubuntu作为基本映像编写了一个docker文件,并安装了Java和tomcat,昨天它运行良好。我删除了所有容器和图像,并尝试再次构建图像​​,但是随后出现此错误:

E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/i/icu/libicu60_60.2-3ubuntu3_amd64.deb  Connection failed [IP: 91.189.88.149 80]
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/s/shared-mime-info/shared-mime-info_1.9-2_amd64.deb  Unable to connect to archive.ubuntu.com:http: [IP: 91.189.88.24 80]
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/x/xdg-user-dirs/xdg-user-dirs_0.17-1ubuntu1_amd64.deb  Unable to connect to archive.ubuntu.com:http: [IP: 91.189.88.24 80]
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/libd/libdrm/libdrm-common_2.4.95-1~18.04.1_all.deb  Unable to connect to archive.ubuntu.com:http: [IP: 91.189.88.24 80]
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/libd/libdrm/libdrm2_2.4.95-1~18.04.1_amd64.deb  Unable to connect to archive.ubuntu.com:http: [IP: 91.189.88.24 80]
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/libe/libedit/libedit2_3.1-20170329-1_amd64.deb  Unable to connect to archive.ubuntu.com:http: [IP: 91.189.88.24 80]
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/k/keyutils/libkeyutils1_1.5.9-9.2ubuntu2_amd64.deb  Unable to connect to archive.ubuntu.com:http: [IP: 91.189.88.24 80]
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/libp/libpsl/libpsl5_0.19.1-5build1_amd64.deb  Unable to connect to archive.ubuntu.com:http: [IP: 91.189.88.24 80]
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/libx/libxmu/libxmuu1_1.1.2-2_amd64.deb  Unable to connect to archive.ubuntu.com:http: [IP: 91.189.88.24 80]

它的结尾是:

The command '/bin/sh -c apt-get -y install openjdk-8-jdk wget' returned a non-zero code: 100

这是dockerfile:

FROM ubuntu:latest
RUN apt-get -y update
RUN apt-get -y install openjdk-8-jdk wget
RUN mkdir /usr/local/tomcat
RUN wget https://www-eu.apache.org/dist/tomcat/tomcat-8/v8.5.42/bin/apache-tomcat-8.5.42.tar.gz -O /tmp/tomcat.tar.gz
RUN cd /tmp && tar xvfz tomcat.tar.gz
RUN cp -Rv /tmp/apache-tomcat-8.5.42/* /usr/local/tomcat/
RUN rm -rf /usr/local/tomcat/conf/server.xml
COPY server.xml /usr/local/tomcat/conf/
EXPOSE 9090
CMD /usr/local/tomcat/bin/catalina.sh run

我在线搜索了错误,发现这是互联网连接问题,但是我的互联网工作正常,这是怎么回事?

0 个答案:

没有答案