为什么我不能使用 Debian 的 Docker 映像将文件从“curl”通过管道传输到“tar”?

Gus*_*rea 2 docker

为什么以下在 Debian Jessie 的 Docker 映像上失败?

# curl --silent --show-error --location https://download.owncloud.org/community/owncloud-8.0.3.tar.bz2 | tar xjv
tar (grandchild): bzip2: Cannot exec: No such file or directory
tar (grandchild): Error is not recoverable: exiting now
tar: Child died with signal 13
tar: Error is not recoverable: exiting now
curl: (23) Failed writing body (4096 != 16384)
Run Code Online (Sandbox Code Playgroud)

我无法在 Dockerfile RUN语句中或在图像“php:5.6-fpm”(基于“debian:jessie”)的交互式 bash shell 中运行它。

但是,我可以在许多其他 Debian 和 Ubuntu 系统上运行它。

这是 Docker 的问题吗?

jwo*_*der 5

此错误消息似乎很清楚:

tar (grandchild): bzip2: Cannot exec: No such file or directory
Run Code Online (Sandbox Code Playgroud)

bzip2debian:jessie实例中不存在,因此如果您想使用 bzip2 压缩,您必须首先使用apt-get install bzip2.