-
Notifications
You must be signed in to change notification settings - Fork 180
Open
Labels
Description
I have a neo4j local deployment that needs to have an apoc.conf file. To include this in the deployment, I'm mounting the local volume with apoc.conf into neo4j's container folder, /var/lib/neo4j/conf. When running docker-compose up, the container dies and I get an error message ( see steps below) in the docker logs.
Neo4j Version: 5.11.0-community-bullseye
Operating System: MacOS 13.5.1 (22G90)
API: Docker
Steps to reproduce
- Create ~/deployment
- Add the docker-compose.yml file below to it
- Create ~/deployment/neo4j/conf
- Add the apoc.conf file below to it
- Run
docker-compose up
- See that the deployment failed
- Check the logs with
docker ps --all
anddocker logs
- See similar error to
sed: couldn't open temporary file /var/lib/neo4j/conf/sed8CXFyW: Permission denied
- See sed file in the mounted config folder
Expected behavior
The apoc.conf file is copied into the container, and the application runs without error
Actual behavior
A new file is created in the mounted directory without permissions, causing the deployment to fail
---------- 1 thomas staff 0 Sep 8 21:02 sedUqUrUV
Local setup
Filesystem
- deployment
- docker-compose.yaml
- neo4j
- conf
- apoc.conf
docker-compose.yml
services:
neo4j:
image: neo4j:5.11.0-community-bullseye
container_name: neo4j
ports:
- "7474:7474"
- "7687:7687"
environment:
- NEO4J_AUTH=neo4j/neo4j222
volumes:
- ~/deployment/neo4j/conf:/var/lib/neo4j/conf
apoc.conf
apoc.import.file.enable=true