I’m trying to install the neo4j-graphql extension in a container built from the official neo4j image. Since the neo4j image is built on a JRE image, I couldn’t build the jar files using maven. I forked github/neo4j-graphql/neo4j-graphql with the goal of using docker to pre-build the package. I added the following Dockerfile to the root of the project.
FROM openjdk:8-jdk
# Install git and maven.
RUN apt-get update && apt-get install -y --no-install-recommends git maven
# Get the neo4j-graphql source.
RUN git clone https://github.com/neo4j-graphql/neo4j-graphql
WORKDIR neo4j-graphql
RUN git checkout 3.2
# Build the package.
RUN mvn clean package
I then ran the following.
$ docker build -t 'neo4j-graphql-dist' .
$ docker run -d -it -v $PWD/dist:/neo4j-graphql/target neo4j-graphql-dist
I expected to see the jar file(s) in dist
locally. But as that wasn’t the case, I ran the following to view the container.
docker exec -it nostalgic_ardinghelli /bin/bash
Inside the container, ls /neo4j-graphql/target
was empty.
When the image was built, I saw the following two logs.
[INFO] Building jar: /neo4j-graphql/target/neo4j-graphql-3.2.3.1-SNAPSHOT.jar
[INFO] Replacing /neo4j-graphql/target/neo4j-graphql-3.2.3.1-SNAPSHOT.jar with /neo4j-graphql/target/neo4j-graphql-3.2.3.1-SNAPSHOT-shaded.jar
So I fully expected to see a jar file in the /neo4j-graphql/target
directory. Any clues as to why the jar file isn’t there or, if it is, why I’m not able to see it?
Thanks.