rdf4j
rdf4j copied to clipboard
Document how to mount a volume when using Docker
Current Behavior
Currenty if I mount a directory like in the following docker-compose it is very likely that the container won't go up because it has no permission to write into those directories
version: '3.7'
services:
rdf4j:
image: eclipse/rdf4j-workbench:3.7.4
privileged: true
restart: always
environment:
JAVA_OPTS: '-Xmx4g -Xms4g'
ports:
- 8080:8080
volumes:
- ./data:/var/rdf4j
- ./logs:/usr/local/tomcat/logs
restart: unless-stopped
Expected Behavior
The docker container should go up without errors
Steps To Reproduce
- Create a directory somewhere (e.g. /tmp/rdf4j) and cd into it (e.s. cd /tmp/rdf4j)
- mkdir data ; mkdir logs
- create a file docker-compose.yml with the following content
version: '3.7'
services:
rdf4j:
image: eclipse/rdf4j-workbench:3.7.4
privileged: true
restart: always
environment:
JAVA_OPTS: '-Xmx4g -Xms4g'
ports:
- 8080:8080
volumes:
- ./data:/var/rdf4j
- ./logs:/usr/local/tomcat/logs
restart: unless-stopped
- Run docker-compose up
- The container complains about missing permissions (about writing into those 2 directories)
Version
3.7.4
Are you interested in contributing a solution yourself?
Yes
Anything else?
Document to change permission to 777 and add a sticky bit to the created folders. That is:
- chmod 777 data logs
- chmod +t data logs
Thanks for reporting this @fpompermaier - adding these instruction to the README of the docker dir would (as a first step) be very useful I think.