直到幾天後Dockerfile
工作正常,當我試圖再次建立它今天它在終端給出以下錯誤。我嘗試了多個碼頭基礎圖像,但仍然給出了相同的錯誤。誰能幫我這個?我不認爲我錯過了任何東西。如果我錯過了它本應早些時候給我錯誤,但爲什麼現在呢?Dockerfile無法建立
Err:1 http://security.ubuntu.com/ubuntu xenial-security InRelease
Temporary failure resolving 'security.ubuntu.com'
Err:2 http://archive.ubuntu.com/ubuntu xenial InRelease
Temporary failure resolving 'archive.ubuntu.com'
Err:3 http://archive.ubuntu.com/ubuntu xenial-updates InRelease
Temporary failure resolving 'archive.ubuntu.com'
Err:4 http://archive.ubuntu.com/ubuntu xenial-backports InRelease
Temporary failure resolving 'archive.ubuntu.com'
Reading package lists...
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial/InRelease Temporary failure resolving 'archive.ubuntu.com'
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial-updates/InRelease Temporary failure resolving 'archive.ubuntu.com'
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial-backports/InRelease Temporary failure resolving 'archive.ubuntu.com'
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/xenial-security/InRelease Temporary failure resolving 'security.ubuntu.com'
W: Some index files failed to download. They have been ignored, or old ones used instead.
Reading package lists...
Building dependency tree...
Reading state information...
E: Unable to locate package software-properties-common
和我的碼頭工人的版本是 Docker version 17.03.2-ce, build f5ec1e2
這裏是我的Dockerfile
FROM ubuntu:16.04
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update -y && \
apt-get install -y software-properties-common && \
apt-add-repository ppa:webupd8team/java && \
apt-get update -y && \
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886 && \
echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | /usr/bin/debconf-set-selections && \
apt-get install -y oracle-java8-installer && \
apt-get install -y oracle-java8-unlimited-jce-policy && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* && \
rm -rf /var/cache/oracle-jdk8-installer
ENV JAVA_HOME /usr/lib/jvm/java-8-oracle
看起來像一個連接錯誤。 Docker無法找到有關當前ubuntu AND的信息,忽略該警告後無法獲得軟件屬性通用包。你有任何代理或連接問題? – Gabbax0r
不是。連接很好。我現在該怎麼辦?有沒有解決方案 –
絕對是一個連接問題。我試過你的Dockerfile,它工作完美。 可以試試'install -y --no-install-recommendation'? – Mornor