我正在执行此tutorial以使用Apache Hadoop加载批处理数据,并且尝试运行此命令来构建名为“druid-hadoop-demo”的Docker镜像,其版本标签为“2.8.5”:docker build -t druid-hadoop-demo:2.8.5 .
但这给了我这个错误
Step 14/53 : RUN curl -s https://archive.apache.org/dist/hadoop/core/hadoop-2.8.3/hadoop-2.8.3.tar.gz | tar -xz -C /usr/local/ ---> Running in 7baa699ccc29
gzip: stdin: unexpected end of file tar: Child returned status 1 tar: Error is not recoverable: exiting now The command '/bin/sh -c curl -s https://archive.apache.org/dist/hadoop/core/hadoop-2.8.3/hadoop-2.8.3.tar.gz | tar -xz -C /usr/local/' returned a non-zero code: 2
任何帮助表示赞赏。
最佳答案
这是网络错误,表明您下载的文件在传输过程中已损坏(对我而言下载正确,因此不太可能是源文件),或者在完成curl命令之前已断开连接。检查网络代理,间歇性网络故障或任何其他可能中断连接的情况。您也可以尝试从容器内手动运行curl以查看它是否成功,例如
curl -o hadoop.tgz https://archive.apache.org/dist/hadoop/core/hadoop-2.8.3/hadoop-2.8.3.tar.gz
tar -tvzf hadoop.tgz
关于docker - 为Druid构建Docker镜像时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59937614/