Docker容器无法findZip包?

所有的Ubuntu威利仓库被添加到我的Dockerfile,即mainuniverse等,并存在于我的泊坞窗图像。 但是,以下Dockerfile中的apt-get install无法find任何ZIP / UnZIP包。 错误login到最后。

我怎样才能安装这些常用的压缩包? 至lessp7zip-fullrar

Dockerfile

 FROM ubuntu:15.10 CMD ["bash"] RUN add-apt-repository main && \ add-apt-repository universe && \ add-apt-repository restricted && \ add-apt-repository multiverse RUN apt-get update -y && \ apt-get upgrade -y && \ apt-get dist-upgrade -y && \ apt-get -y autoremove && \ apt-get clean RUN apt-get install p7zip \ p7zip-full \ p7zip-rar \ unace \ unrar \ zip \ unzip \ xz-utils \ sharutils \ rar \ uudeview \ mpack \ arj \ cabextract \ file-roller \ && rm -rf /var/lib/apt/lists/* 

错误发生

 E: Unable to locate package p7zip-full E: Unable to locate package unace E: Unable to locate package unrar E: Unable to locate package zip E: Unable to locate package unzip E: Unable to locate package sharutils E: Unable to locate package rar E: Unable to locate package uudeview E: Unable to locate package mpack E: Unable to locate package arj E: Unable to locate package cabextract E: Unable to locate package file-roller 

尝试这个Dockerfile (你没有我之前的评论中告诉你的Dockerfile):

 FROM ubuntu:15.10 RUN apt-get update -y && \ apt-get upgrade -y && \ apt-get dist-upgrade -y && \ apt-get -y autoremove && \ apt-get clean RUN apt-get install -y p7zip \ p7zip-full \ unace \ zip \ unzip \ xz-utils \ sharutils \ uudeview \ mpack \ arj \ cabextract \ file-roller \ && rm -rf /var/lib/apt/lists/* CMD ["bash"] 

它的工作原理是安装zip和p7zip

 $ docker build -t mytest . $ docker run -d -ti --name mytest mytest /bin/bash $ docker exec -ti mytest /bin/bash root@f01fc3456a2a:/# zip root@f01fc3456a2a:/# p7zip