kermitt2 / biblio-glutton

A high performance bibliographic information service: https://biblio-glutton.readthedocs.io
125 stars 16 forks source link

Docker image fixes #27

Open lfoppiano opened 5 years ago

lfoppiano commented 5 years ago

Few things to do still with docker:

bnewbold commented 5 years ago

docker-compose up did not work for me; I got a nodejs error complaining that make was not found. I had run in to the same issue when running biblio-glutton on a new server (not using Docker), and the same solution worked: use node v10 LTS instead of v11 (might not be necessary) and install build-essential to get make, g++, etc. The later seems like overkill for the docker image, but I don't know enough about docker or the node ecosystem to recommend an alternative.

I also got an unzip not found error, so added that to the package list.

Here was my patch:

diff --git a/Dockerfile b/Dockerfile
index 45316dd..8a1e4e4 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -26,12 +26,12 @@ RUN cd /app/glutton-source/lookup && ./gradlew clean assemble --no-daemon
 # build runtime image
 # -------------------
 FROM openjdk:8-jre-slim
-RUN apt-get update -qq && apt-get -qy install curl
+RUN apt-get update -qq && apt-get -qy install curl build-essential unzip

 RUN mkdir -p /app
 WORKDIR /app

-RUN curl -sL https://deb.nodesource.com/setup_11.x | bash -
+RUN curl -sL https://deb.nodesource.com/setup_10.x | bash -
 RUN apt-get update -qq && apt-get -y install nodejs
 COPY --from=builder /app/glutton-source/matching /app/matching
 RUN cd matching; npm install

Another docker "TODO" would be to update the GROBID bundle to 0.5.5.

lfoppiano commented 5 years ago

Thanks @bnewbold for the patch. Sorry for late reaction. I've pushed your changes.

lfoppiano commented 3 years ago

I found the solution for this problem: https://automationrhapsody.com/run-dropwizard-application-docker-templated-configuration-using-environment-variables/ and I've succesfully implemented it in another project. I'm planning to spend some time on it at some point 🤞