Skip to content

Instantly share code, notes, and snippets.

@CliffordAnderson
Last active January 16, 2019 17:23
Show Gist options
  • Star 6 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save CliffordAnderson/f0d01d66271fe305ab1391286a1f14d8 to your computer and use it in GitHub Desktop.
Save CliffordAnderson/f0d01d66271fe305ab1391286a1f14d8 to your computer and use it in GitHub Desktop.
Docker Image for Neo4j with APOC and Spatial plugins
# Adding APOC and the Spatial Library to Official Neo4j Docker Image
FROM neo4j:latest
MAINTAINER Clifford Anderson <anderson.clifford@gmail.com>
ENV APOC_URI https://github.com/neo4j-contrib/neo4j-apoc-procedures/releases/download/3.0.4.1/apoc-3.0.4.1-all.jar
ENV GIS_URI https://github.com/neo4j-contrib/m2/blob/master/releases/org/neo4j/neo4j-spatial/0.19-neo4j-3.0.3/neo4j-spatial-0.19-neo4j-3.0.3-server-plugin.jar?raw=true
RUN mv plugins /plugins \
&& ln --symbolic /plugins
RUN curl --fail --silent --show-error --location --output apoc-3.0.4.1-all.jar $APOC_URI \
&& mv apoc-3.0.4.1-all.jar /plugins
RUN curl --fail --silent --show-error --location --output neo4j-spatial-0.19-neo4j-3.0.3-server-plugin.jar $GIS_URI \
&& mv neo4j-spatial-0.19-neo4j-3.0.3-server-plugin.jar /plugins
EXPOSE 7474 7473 7687
CMD ["neo4j"]
@briantq
Copy link

briantq commented Nov 16, 2017

You should be careful with the 'latest' tag for Neo as the versions of apoc relate directly to specific Neo releases. If you get newer versions of neo but don't get newer version of apoc, you will run in an unsupported configuration.

@vcaballero-salle
Copy link

vcaballero-salle commented Apr 16, 2018

I am getting the following error

ln: unrecognized option: symbolic
BusyBox v1.27.2 (2017-12-12 10:41:50 GMT) multi-call binary.

Usage: ln [OPTIONS] TARGET... LINK|DIR

Create a link LINK or DIR/TARGET to the specified TARGET(s)

	-s	Make symlinks instead of hardlinks
	-f	Remove existing destinations
	-n	Don't dereference symlinks - treat like normal file
	-b	Make a backup of the target (if exists) before link operation
	-S suf	Use suffix instead of ~ when making backup files
	-T	2nd arg must be a DIR
	-v	Verbose

I'll try to figure out the solution, just wanted to write it for the record.

@yacineBR
Copy link

The same problem

@genetique-techno
Copy link

I had success removing L9-10 and instead of L12-13 I mv'd the jar directly into the plugins folder:

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

NOTE the newer version of apoc I used, make sure yours is consistent as @briantq stated

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