でパッケージを見つけることができません:ドッキングウィンドウコンテナ内の私のリポジトリを構築しようと、私はgitのをインストールする必要がありますがドッキングウィンドウコンテナ
FROM ubuntu:14.04
RUN apt-get update
RUN apt-get upgrade
RUN apt-get clean
RUN apt-get install -y git
私は、次のコマンドを実行し、コンテナを構築する:
sudo docker build .
私がインストールしようとするすべてのパッケージに、次のエラーを取得:
E: Unable to locate package git
The command '/bin/sh -c apt-get install -y git' returned a non-zero code: 100
私はWERを発見したすべての答え私はapt-getアップデートを最初に実行する必要があると主張しています。
EDIT:
1行ですべてのコマンドを実行しようとしました:
RUN apt-get update && apt-get install -y git
次のエラーをもたらした:
あなたはRUNを集約するために必要なすべてのErr http://archive.ubuntu.com trusty InRelease
Err http://archive.ubuntu.com trusty-updates InRelease
Err http://archive.ubuntu.com trusty-security InRelease
Err http://archive.ubuntu.com trusty Release.gpg
Could not resolve 'archive.ubuntu.com'
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty/InRelease
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 git
The command '/bin/sh -c apt-get update && apt-get install -y git' returned a non-zero code: 100
'RUN apt-get update && apt-get install -y git'のように、すべてのコマンドを1回実行してみてください – user2915097
エラーを再現するためのDockerfile全体を含めてください。あらゆる種類のネットワークフィルタ。 – BMitch
これはエラーを再現するのに十分です。特別なネットワークフィルタはありません。私のパーソナルコンピュータ。 @BMitch –