ncbi / docker

Other
48 stars 32 forks source link

docker build erroneous with edirect 15.0 #18

Open knh11545 opened 3 years ago

knh11545 commented 3 years ago

When using the Dockerfile to build a container with edirect version 15.0 downloading and integration of the gzipped binaries of transmute, rchive & xtract fails in edirect/setup.sh. Therefore the binaries are missing in the image.

In addition, nquire in the resulting image will not work for URLs with https/TLS. That means that nquire is not able to query the eutils which renders the edirect tools mostly non-functional.

I suspect that the malfunctioning of nquire is also the cause of transmute, rchive & xtract not being integrated into the image.

Example:

docker run --rm -it edirect esearch -db pubmed -query "systematic review[ti]"
curl: (60) SSL certificate problem: unable to get local issuer certificate
More details here: https://curl.haxx.se/docs/sslcerts.html

curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above.
 ERROR:
 curl command failed ( Thu May  6 18:04:37 UTC 2021 ) with: 60

https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi -d retmax=0&usehistory=y&db=pubmed&term=systematic%20review%5Bti%5D&tool=edirect&edirect=15.0&edirect_os=Linux&email=root%40a73e729c6207
 WARNING:
 FAILURE ( Thu May  6 18:04:36 UTC 2021 )

nquire -url https://eutils.ncbi.nlm.nih.gov/entrez/eutils/ esearch.fcgi -retmax 0 -usehistory y -db pubmed -term "systematic review[ti]" -tool edirect -edirect 15.0 -edirect_os Linux -email root@a73e729c6207
EMPTY RESULT

SECOND ATTEMPT
[...]
knh11545 commented 3 years ago

An update: When rebuilding the Docker image today error 1 still occured:

docker build -t edirect -t version:15.0 --no-cache .
Sending build context to Docker daemon  4.608kB
Step 1/11 : FROM ubuntu:18.04
 ---> 4eb8f7c43909
[...]
Step 7/11 : RUN curl -s ftp://ftp.ncbi.nlm.nih.gov/entrez/entrezdirect/edirect.tar.gz |  tar xzf - &&  cpanm HTML::Entities &&  edirect/setup.sh
 ---> Running in 73a73a450af6
--> Working on HTML::Entities
Fetching http://www.cpan.org/authors/id/O/OA/OALDERS/HTML-Parser-3.76.tar.gz ... OK
Configuring HTML-Parser-3.76 ... OK
Building and testing HTML-Parser-3.76 ... OK
Successfully installed HTML-Parser-3.76 (upgraded from 3.69)
1 distribution installed
gzip: xtract.Linux.gz: No such file or directory
Unable to download xtract executable.
gzip: transmute.Linux.gz: No such file or directory
Unable to download transmute executable.
gzip: rchive.Linux.gz: No such file or directory
Unable to download rchive executable.

Entrez Direct has been successfully downloaded and installed.

[...]

However, error 2 was resolved: In the resulting image nquire now worked:

> docker run --rm -it edirect nquire -curl -eutils esearch.fcgi -retmax 0 -usehistory y -db pubmed -term "(scoping review [TI]) AND (protocol [TI])"
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE eSearchResult PUBLIC "-//NLM//DTD esearch 20060628//EN" "https://eutils.ncbi.nlm.nih.gov/eutils/dtd/20060628/esearch.dtd">
<eSearchResult><Count>833</Count><RetMax>0</RetMax><RetStart>0</RetStart><QueryKey>1</QueryKey><WebEnv>MCID_6095034a686f463f41219c5d</WebEnv><IdList/><TranslationSet/><TranslationStack>   <TermSet>    <Term>scoping review[TI]</Term>    <Field>TI</Field>    <Count>7218</Count>    <Explode>N</Explode>   </TermSet>   <TermSet>    <Term>protocol[TI]</Term>    <Field>TI</Field>    <Count>57478</Count>    <Explode>N</Explode>   </TermSet>   <OP>AND</OP>  </TranslationStack><QueryTranslation>scoping review[TI] AND protocol[TI]</QueryTranslation></eSearchResult>