- Linux - Please retrieve the current user IDs (UID and GID) with the command
id
and update the environment fileenv
accordingly. - MacOS/Windows - No steps necessary
If you are running inside a virtual machine and using a shared folder
, please update UID and GID inside env
with the IDs of the snapshots folder owner or group.
cd docker_instances/neo4j_docker/neo4j_docker/
ls -la
# drwxrwx--- 3 root vboxsf 96 Jun 25 17:12 .
# drwxrwx--- 3 root vboxsf 96 Jun 25 17:12 ..
# drwxrwx--- 3 root vboxsf 96 Jun 25 17:27 .env
# drwxrwx--- 3 root vboxsf 96 Jun 25 17:27 README.md
# drwxrwx--- 3 root vboxsf 96 Jun 25 17:27 docker-compose.yaml
# drwxrwx--- 3 root vboxsf 96 Jun 25 17:27 snapshots
In this example, root
is the owner and vboxsf
is the group of the respective files.
We do not want applications inside the Docker image to run with sudo permission. Looking at the permissions we can see that group has read and write (drwxrw
x---) permissions on the folder files.
vboxsf
should be used as user for the Docker image because of its rw access. If this situation does not correspond to yours, please change permissions or ownership of the folder.
cd neo4j_docker
# Allow everyone to have access
chmod -R 777 snapshots
# Change ownership of the folder
chown -R [OWNER]:[GROUP] snapshots
Now that the owner of the folder has been established, we can proceed in looking up their UID/GID.
id
# uid=1000([OWNER]) gid=1000([GROUP]) groups=1000([GROUP]),27(sudo),999(vboxsf)
# Based on the setup we are going to use either 999 or 1000 if we changed ownership/permissions.
Please execute the following commands. Depending on the operating system you may need privileged rights.
cd neo4j_docker
docker compose up -d
# or
docker-compose up -d
-d
detaches the terminal from the container.
The Neo4j ports can also be changed inside the environment file .env
, in order to prevent failure due to already used ports by other services you may have active on your machine.
Snapshots of the Neo4j database will be stored in the neo4j_docker/snapshots
directory. We provide a tool to visualize these snapshots as well as changes to the knowledge graph.