我正在尝试使用tar命令解压缩samtools-0.1.18.tar.bz2
tar -xjvf samtools-0.1.18.tar.bz2
我可以在没有docker的情况下运行tar命令。但是当我尝试使用docker解决它时,它给了我错误。有人可以帮忙。
Dockerfile:
FROM amazonlinux
RUN yum -y install bzip2
WORKDIR /sharedData
RUN echo "Installing SMTOOLS."
ADD https://sourceforge.net/projects/samtools/files/samtools/0.1.18/samtools-0.1.18.tar.bz2 /sharedData
RUN tar -xjvf samtools-0.1.18.tar.bz2
错误:
Step 5/6 : ADD https://sourceforge.net/projects/samtools/files/samtools/0.1.18/samtools-0.1.18.tar.bz2 /sharedData
Downloading 130.2 kB
---> c524de5863ce
Removing intermediate container 941f57797c7b
Step 6/6 : RUN tar -xjvf samtools-0.1.18.tar.bz2
---> Running in 0391b2f5bf9c
tar (child): bzip2: Cannot exec: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now
The command '/bin/sh -c tar -xjvf samtools-0.1.18.tar.bz2' returned a non-zero code: 2
答案 0 :(得分:0)
这有效:
FROM amazonlinux
WORKDIR /sharedData
RUN yum install -y bzip2
RUN yum install -y wget
RUN wget https://sourceforge.net/projects/samtools/files/samtools/0.1.18/samtools-0.1.18.tar.bz2
RUN tar -xjvf samtools-0.1.18.tar.bz2