Neo4j

Neo4j Docker image with APOC procedure plugin installed

  • Posted on: 24 September 2017
  • By: Zhijun Chen

APOC is quite useful when running cypher query with Neo4j.

The following Dockerfile script provides pre-installed APOC plugins with Neo4j enterprise image.

FROM neo4j:3.2.3-enterprise

RUN apk add --no-cache --quiet \
bash \
curl

WORKDIR /var/lib/neo4j

RUN mkdir scripts

COPY ./scripts/neo4j/apoc-warmup.cql scripts/apoc-warmup.cql

ENV NEO4J_HOME=/var/lib/neo4j
ARG APOC_URI=https://github.com/neo4j-contrib/neo4j-apoc-procedures/releases/download/3.2.0.4/apoc-3.2.0.4-all.jar

RUN curl --fail --silent --show-error --location --output apoc-3.2.0.4-all.jar $APOC_URI \
&& mv apoc-3.2.0.4-all.jar plugins/

EXPOSE 7474 7473 7687

CMD ["neo4j"]

NB: Check the APOC version to match the Neo4j version used.