当我尝试从dockFile构建映像时遇到错误

时间:2018-08-16 02:10:08

标签: docker

当我尝试运行 docker build -t testDocker时,我制作了一个dockerFile。 --no-cache ,出现以下错误:

E: Failed to fetch http://211.76.113.82:80/data/053e3163532a4b0d/archive.ubuntu.com/ubuntu/pool/main/r/readline/libreadline7_7.0-3_amd64.deb  Redirection loop encountered
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
The command '/bin/sh -c apt-get install -y software-properties-common' returned a non-zero code: 100

这是我的dockerFile

FROM ubuntu
MAINTAINER jimmy

#install nginx
RUN apt-get update
RUN apt-get install -y software-properties-common 
RUN apt-add-repository ppa:ondrej/php
RUN apt-get install -y php7.1 php7.1-fpm
RUN apt-get install -y nginx

谁能告诉我为什么会发生错误?

1 个答案:

答案 0 :(得分:0)

Dockerfile没什么问题,但是没有什么会导致构建失败。我在本地使用您的dockerfile构建了映像,并且可以正常工作。

尝试一下:

将dockerFile重命名为Dockerfile

运行:

const maxVal = Math.max(...adventurers.map(o => o.time))

您的问题是您将--no-cache放在错误的位置,它必须在docker build --no-cache -t test .

之前

此外,您还应该将Dockerfile更新为:

.
相关问题