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

Docker image fixes #27

Open
2 tasks
lfoppiano opened this issue May 8, 2019 · 3 comments
Open
2 tasks

Docker image fixes #27

lfoppiano opened this issue May 8, 2019 · 3 comments

Comments

@lfoppiano
Copy link
Collaborator

Few things to do still with docker:

  • fix docker build / gradle build to correctly replace urls of elastic and grobid
  • push the image on hub.docker
@bnewbold
Copy link
Contributor

bnewbold commented Jun 1, 2019

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
Copy link
Collaborator Author

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

@lfoppiano
Copy link
Collaborator Author

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 🤞

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

No branches or pull requests

2 participants