使用FROM perl

问题描述

我正在尝试为perl脚本CooVar创建一个Docker容器,但是似乎由于tar命令不可用而遇到问题。

Dockerfile

FROM perl:5.20


RUN mkdir /tmp/install
workdir /tmp/install

# Install cpan modules
RUN cpanm install Cwd Getopt::Long POSIX File::Basename List::Util Bio::DB::Fasta Bio::Seq Bio::SeqUtils Bio::SeqIO Set::IntervalTree Set::IntSpan

# Download CooVar-v0.07
RUN wget -O /usr/local/bin/CooVar-0.07.tar.gz http://genome.sfu.ca/projects/coovar/CooVar-0.07.tar.gz
RUN tar xvf /usr/local/bin/CooVar-0.07.tar.gz

# Set workdir to /data -- predefined mount location.
RUN mkdir /data
workdir /data

# And clean up
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/install

# Set Entrypoint
ENTRYPOINT ["perl","/usr/local/bin/coovar-0.07/coovar.pl"]

注意:我认为这里使用Entrypoint阻止了我通过Docker探索docker exec -t -i mycontainer /bin/bash容器文件系统,但这不是一个大问题我认为我从下面的错误中知道了问题所在。

错误

Snakemake运行此程序时,我包括ls /usr/bin so I can see what was in the container (very new to Docker and not sure the best way to develop/debug yet). You can see that the。tar.gz was not unzipped so it looks like tar在这种情况下不起作用。

drwxrwxr-x  2 root root   2137 Oct 10 12:36 .
drwxrwxr-x 10 root root    147 May  5  2016 ..
-rw-r--r--  1 root root 176772 Nov 20  2012 CooVar-0.07.tar.gz
-rwxr-xr-x  1 root root 112680 May  5  2016 a2p
-rwxr-xr-x  1 root root   2861 Oct 10 12:35 bp_aacomp
-rwxr-xr-x  1 root root   3696 Oct 10 12:35 bp_bioflat_index
-rwxr-xr-x  1 root root   1605 Oct 10 12:35 bp_biogetseq
-rwxr-xr-x  1 root root   2803 Oct 10 12:35 bp_dbsplit
-rwxr-xr-x  1 root root   2866 Oct 10 12:35 bp_extract_feature_seq
-rwxr-xr-x  1 root root   4002 Oct 10 12:35 bp_fastam9_to_table
-rwxr-xr-x  1 root root   7385 Oct 10 12:35 bp_fetch
-rwxr-xr-x  1 root root   1809 Oct 10 12:35 bp_filter_search
-rwxr-xr-x  1 root root  15121 Oct 10 12:35 bp_find-blast-matches
-rwxr-xr-x  1 root root   3427 Oct 10 12:35 bp_gccalc
-rwxr-xr-x  1 root root  79742 Oct 10 12:35 bp_genbank2gff3
-rwxr-xr-x  1 root root   4617 Oct 10 12:35 bp_index
-rwxr-xr-x  1 root root   1877 Oct 10 12:35 bp_local_taxonomydb_query
-rwxr-xr-x  1 root root   3239 Oct 10 12:35 bp_make_mrna_protein
-rwxr-xr-x  1 root root   4898 Oct 10 12:35 bp_mask_by_search
-rwxr-xr-x  1 root root   3041 Oct 10 12:35 bp_mrtrans
-rwxr-xr-x  1 root root   4292 Oct 10 12:35 bp_mutate
-rwxr-xr-x  1 root root    927 Oct 10 12:35 bp_nexus2nh
-rwxr-xr-x  1 root root   3533 Oct 10 12:35 bp_nrdb
-rwxr-xr-x  1 root root   6331 Oct 10 12:35 bp_oligo_count
-rwxr-xr-x  1 root root   7317 Oct 10 12:35 bp_process_gadfly
-rwxr-xr-x  1 root root   3752 Oct 10 12:35 bp_process_sgd
-rwxr-xr-x  1 root root  24416 Oct 10 12:35 bp_revtrans-motif
-rwxr-xr-x  1 root root   4190 Oct 10 12:35 bp_search2alnblocks
-rwxr-xr-x  1 root root  12519 Oct 10 12:35 bp_search2gff
-rwxr-xr-x  1 root root   2455 Oct 10 12:35 bp_search2table
-rwxr-xr-x  1 root root   2739 Oct 10 12:35 bp_search2tribe
-rwxr-xr-x  1 root root   1779 Oct 10 12:35 bp_seq_length
-rwxr-xr-x  1 root root   2289 Oct 10 12:35 bp_seqconvert
-rwxr-xr-x  1 root root   3833 Oct 10 12:35 bp_seqcut
-rwxr-xr-x  1 root root   4595 Oct 10 12:35 bp_seqpart
-rwxr-xr-x  1 root root   2339 Oct 10 12:35 bp_seqret
-rwxr-xr-x  1 root root   1549 Oct 10 12:35 bp_seqretsplit
-rwxr-xr-x  1 root root   4291 Oct 10 12:35 bp_split_seq
-rwxr-xr-x  1 root root   5912 Oct 10 12:35 bp_sreformat
-rwxr-xr-x  1 root root   3243 Oct 10 12:35 bp_taxid4species
-rwxr-xr-x  1 root root   2940 Oct 10 12:35 bp_taxonomy2tree
-rwxr-xr-x  1 root root   1624 Oct 10 12:35 bp_translate_seq
-rwxr-xr-x  1 root root   1488 Oct 10 12:35 bp_tree2pag
-rwxr-xr-x  1 root root   7504 Oct 10 12:35 bp_unflatten_seq
-rwxr-xr-x  2 root root  36619 May  5  2016 c2ph
-rwxr-xr-x  1 root root   7144 Oct 10 12:33 config_data
-rwxr-xr-x  1 root root  12804 May  5  2016 corelist
-rwxr-xr-x  1 root root   5873 May  5  2016 cpan
-rwxr-xr-x  1 root root 303998 May  5  2016 cpanm
-rwxr-xr-x  1 root root  41760 Oct 10 12:24 enc2xs

任何人都知道如何解决Dockerfile吗?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)