Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
09-27-2019 08:16 AM
When I run Neo4j in Docker, the plugins don't work. In my case: APOC and ALGO.
1.What did I do? Dockerfile created.
FROM neo4j:3.5.8
# Enable APOCs
ENV APOC_VERSION 3.5.0.4
ENV APOC_URL https://github.com/neo4j-contrib/neo4j-apoc-procedures/releases/download/${APOC_VERSION}/apoc-${APOC_VERSION}-all.jar
RUN (cd /var/lib/neo4j/plugins && curl -OL $APOC_URL)
# Enable Algorithms
ENV ALGOS_VERSION 3.5.8.0
ENV ALGOS_URL http://s3-eu-west-1.amazonaws.com/com.neo4j.graphalgorithms.dist/neo4j-graph-algorithms-$ALGOS_VERSION-standalone.jar
RUN (cd /var/lib/neo4j/plugins && curl -OL $ALGOS_URL)
EXPOSE 7474 7473 7687
RUN apt-get update
RUN apt-get install nano
CMD ["neo4j"]
docker build --tag=myimage .
docker run \
--name my_container \
-p 7474:7474 -p 7687:7687 \
-v $HOME/neo4j/data:/data \
-v $HOME/neo4j/logs:/logs \
-v $HOME/neo4j/plugins:/plugins \
-e NEO4J_dbms_memory_pagecache_size=4G \
-e NEO4J_apoc_export_file_enabled=true \
-e NEO4J_apoc_import_file_enabled=true \
-e NEO4J_apoc_import_file_use__neo4j__config=true \
-e NEO4J_dbms_security_procedures_unrestricted=apoc.\\\*,algo.\\\* \
-e NEO4J_AUTH=neo4j/neo4j \
myimage
In the config file the highlighted definition looks a little bit wrong.
But even if I correct this manually
dbms.security.procedures.unrestricted=apoc.*,algo.*
and use "neo4j restart", I can't use apoc or algo functionality.
How do I get this to work?
The plugins themselves are in the right folder:
Solved! Go to Solution.
09-29-2019 07:55 AM
What I think your dockerfile says is that you built the plugins into a custom container you built -- and then also mounted a /plugins directory over top of what the container you built provided. So maybe the directory you mounted (which shouldn't have been necessary) didn't contain them?
Note that if you use the vanilla docker container and do what @david.fauth was suggesting it should work. You can either build the plugins into the container and run your container without argument, or use the vanilla container and run with a mount argument -- but don't do both.
09-27-2019 08:41 AM
Can you try mounting your plugins directory as /var/lib/neo4j/plugins
Dave
06-20-2022 03:47 PM
I have the same issue regarding apoc running in docker.
I have the same issue How can I fix it ?
Here is the link : https://community.neo4j.com/t5/drivers-stacks/neo4j-with-shortestpath-by-using-many-cities-with-its-...
09-29-2019 07:55 AM
What I think your dockerfile says is that you built the plugins into a custom container you built -- and then also mounted a /plugins directory over top of what the container you built provided. So maybe the directory you mounted (which shouldn't have been necessary) didn't contain them?
Note that if you use the vanilla docker container and do what @david.fauth was suggesting it should work. You can either build the plugins into the container and run your container without argument, or use the vanilla container and run with a mount argument -- but don't do both.
All the sessions of the conference are now available online