对此进行了尝试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