Oh, very happy to hear that! Are you going to put it up on DockerHub?

Egon

On Thu, Sep 13, 2018 at 10:42 PM Maria Sorokina <maria.ssorok...@gmail.com>
wrote:

> I managed to make my app function.
>
> The problem comes from the way a Spring Boot application packages the jar
> - internally, the jar is different from plain old Java, so the deployment
> of artefacts is also different. The Jnati library that allows the wrapping
> of the InChi factory is not adapted to that special deployment and is
> simply lost and doesn’t find the artifacts in correct places *if it never
> ran on the system before* (case of a brand new minimal image).
> The trick I found to make a Spring Boot application using InChis run in
> Docker is not very elegant, but functional. In the container, during the
> compilation, or at the execution of the container, before running the main
> Spring Boot jar, run the simples possible mini POJO jar containing the
> InChiGeneratorFactory, that will create the correct environment.
> Now everything works!
>
> This is my Dockerfile:
>
> FROM openjdk:8u171-slim
> EXPOSE 8080
> VOLUME /tmp
> ARG JAR_FILE
> COPY ${JAR_FILE} app.jar
> COPY inchiPet.jar /
>
> RUN java -jar inchiPet.jar
>
> ENTRYPOINT 
> ["java","-Djava.security.egd=file:/dev/./urandom","-jar","/app.jar"]
>
> Where « inchiPet.jar » is the tiny regular jar with only a call to an
> inchiGeneratorFactory, and « app.jar » is my main app.
>
> However, I used a bunch of libraries from CDK and until now, only the
> InChi generator caused this problem within the Spring Boot - Docker
> ecosystem.
>
> Hope this solution could help anybody encountering this kind of problem in
> the future!
>
> Maria Sorokina, PhD
> Steinbeck Research Group
> Analytical Chemistry - Cheminformatics and Chemometrics
> Friedrich-Schiller-University Jena, Germany
> http://cheminf.uni-jena.de
>


-- 
E.L. Willighagen
Department of Bioinformatics - BiGCaT
Maastricht University (http://www.bigcat.unimaas.nl/)
Homepage: http://egonw.github.com/
Blog: http://chem-bla-ics.blogspot.com/
PubList: https://www.zotero.org/egonw
ORCID: 0000-0001-7542-0286 <http://orcid.org/0000-0001-7542-0286>
ImpactStory: https://impactstory.org/u/egonwillighagen
_______________________________________________
Cdk-user mailing list
Cdk-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdk-user

Reply via email to