rdf4j icon indicating copy to clipboard operation
rdf4j copied to clipboard

Document how to mount a volume when using Docker

Open fpompermaier opened this issue 2 years ago • 1 comments

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

  1. Create a directory somewhere (e.g. /tmp/rdf4j) and cd into it (e.s. cd /tmp/rdf4j)
  2. mkdir data ; mkdir logs
  3. 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
  1. Run docker-compose up
  2. 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

fpompermaier avatar Dec 22 '21 15:12 fpompermaier

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.

abrokenjester avatar Jan 08 '22 03:01 abrokenjester