neo4j / docker-neo4j

Docker Images for the Neo4j Graph Database
Apache License 2.0
327 stars 171 forks source link

Neo4j import folder not linked in Docker volume #462

Open FrancescoSaverioZuppichini opened 3 years ago

FrancescoSaverioZuppichini commented 3 years ago

This is my docker-compose file

version: "3"
services:
  neo4j:
    image: neo4j:latest
    hostname: neo4j
    container_name: neo4j
    ports:
      - "7474:7474"
      - "7687:7687"
    volumes:
      - $VOLUMES/neo4j/data:/data
      - $VOLUMES/neo4j/plugins:/plugins
      - $VOLUMES/neo4j/logs:/logs
      - $VOLUMES/neo4j/import:/import

    environment:
      - NEO4J_AUTH=neo4j/test
    network_mode: host

Steps to reproduce

  1. Pull the image: docker pull neo4j:latest
  2. Create the previous docker-compose file
  3. Run it
  4. Attach a shell to the container, cd /import and touch foo.txt
  5. foo.txt is not in the volume $VOLUMES/neo4j/import

Expected behavior

The volume should the correct linked to /import

Actual behavior

The volume is not linked to /import

paldeep-singh commented 1 year ago

Were you able to fix this? I am currently having the same issue.

ThomasThelen commented 1 year ago

This is how I mount local data to the neo4j container, without issue

services:
  neo4j:
    image: neo4j:5.11.0-community-bullseye
    container_name: neo4j
    ports:
      - "7474:7474"
      - "7687:7687"
    environment:
      - NEO4J_AUTH=neo4j/neo4j1234
    volumes:
      - some/local.dir/with/import/data:/var/lib/neo4j/import