Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v1.0/english Dockerfile does not build #30

Open
agentydragon opened this issue Jan 21, 2019 · 1 comment
Open

v1.0/english Dockerfile does not build #30

agentydragon opened this issue Jan 21, 2019 · 1 comment

Comments

@agentydragon
Copy link

agentydragon commented Jan 21, 2019

I get this output when trying to build the v1.0/english Docker image:

 $ docker build -f Dockerfile  -t english_spotlight .                                                                                             Sending build context to Docker daemon  4.608kB
Step 1/9 : FROM openjdk:8-jre-alpine
 ---> 7e72a7dcf7dc
Step 2/9 : MAINTAINER  DBpedia Spotlight Team <dbp-spotlight-developers@lists.sourceforge.net>
 ---> Using cache
 ---> 3995abdb63de
Step 3/9 : ENV RELEASE_SERVER    downloads.dbpedia-spotlight.org
 ---> Using cache
 ---> 5ec8117b6337
Step 4/9 : ENV RELEASE_FILENAME  dbpedia-spotlight-1.0.0.jar
 ---> Using cache
 ---> dab298eb06b7
Step 5/9 : ENV LANGUAGE_MODEL    en_2+2.tar.gz
 ---> Using cache
 ---> 396042349550
Step 6/9 : RUN apk add --no-cache curl &&     mkdir -p /opt/spotlight &&     cd /opt/spotlight &&     curl -O "http://$RELEASE_SERVER/spotlight/$RELEASE_FILENAME" &&     curl -O "http://$RELEASE_SERVER/2016-04/en/model/$LANGUAGE_MODEL" &&     tar xvf $LANGUAGE_MODEL  &&     rm  $LANGUAGE_MODEL &&     apk del curl
 ---> Running in fd14ae2c3cb6
fetch http://dl-cdn.alpinelinux.org/alpine/v3.8/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.8/community/x86_64/APKINDEX.tar.gz
(1/4) Installing nghttp2-libs (1.32.0-r0)
(2/4) Installing libssh2 (1.8.0-r3)
(3/4) Installing libcurl (7.61.1-r1)
(4/4) Installing curl (7.61.1-r1)
Executing busybox-1.28.4-r2.trigger
OK: 83 MiB in 56 packages
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   277  100   277    0     0    551      0 --:--:-- --:--:-- --:--:--   551
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   270  100   270    0     0    540      0 --:--:-- --:--:-- --:--:--   538
tar: invalid tar magic
The command '/bin/sh -c apk add --no-cache curl &&     mkdir -p /opt/spotlight &&     cd /opt/spotlight &&     curl -O "http://$RELEASE_SERVER/spotlight/$RELEASE_FILENAME" &&     curl -O "http://$RELEASE_SERVER/2016-04/en/model/$LANGUAGE_MODEL" &&     tar xvf $LANGUAGE_MODEL  &&     rm  $LANGUAGE_MODEL &&     apk del curl' returned a non-zero code: 1
@jemaf
Copy link

jemaf commented Apr 26, 2019

Hey there, I also had the same problem.

It seems that the sourceforge urls provided inside the Dockerfile redirect to another page, which contains the file itself. So, all you have to do is to replace the urls with the redirected one. In my case, I changed the Dockerfile as follows:

FROM openjdk:8-jre-alpine

MAINTAINER  DBpedia Spotlight Team <dbp-spotlight-developers@lists.sourceforge.net>

RUN apk add --no-cache curl && \
    mkdir -p /opt/spotlight  && \
    cd /opt/spotlight  && \
    curl -O "https://ufpr.dl.sourceforge.net/project/dbpedia-spotlight/spotlight/dbpedia-spotlight-1.0.0.jar"  && \
    curl -O "https://ufpr.dl.sourceforge.net/project/dbpedia-spotlight/2016-04/en/model/en_2+2.tar.gz"  && \
    tar xvf en_2+2.tar.gz   && \
    rm  en_2+2.tar.gz && \
    apk del curl

ADD spotlight.sh /bin/spotlight.sh
RUN chmod +x /bin/spotlight.sh

EXPOSE 80

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants