Docker Build:xz(stdin):无法识别文件格式

时间:2017-06-02 02:01:12

标签: docker dockerfile

你在这里总的Docker noob,是否有可以运行的依赖,所以这个错误消失了?

    Step 19/40 : RUN curl -OL https://www.haskell.org/ghc/dist/${ghc%[a-z]}/ghc-${ghc}-x86_64-deb7-linux.tar.xz | tar -xJf- &&   cd ghc-${ghc} &&   ./configure && make install
     ---> Running in 0141996d759f
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100   161  100   161    0     0    335      0 --:--:-- --:--:-- --:--:--   336
    100 85.5M  100 85.5M    0     0   308k      0  0:04:44  0:04:44 --:--:--  358k
    xz: (stdin): File format not recognized
    tar: Child returned status 1
    tar: Error is not recoverable: exiting now
    The command '/bin/sh -c curl -OL https://www.haskell.org/ghc/dist/${ghc%[a-z]}/ghc-${ghc}-x86_64-deb7-linux.tar.xz | tar -xJf- &&   cd ghc-${ghc} &&   ./configure && make install' returned a non-zero code: 2

1 个答案:

答案 0 :(得分:1)

问题是 curl -O选项写入磁盘而不是stdout。

尝试使用:curl -L https://...