You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2021/05/21 13:34:57 UTC

[GitHub] [druid] tazle commented on issue #11282: Permission issues with docker-compose setup

tazle commented on issue #11282:
URL: https://github.com/apache/druid/issues/11282#issuecomment-845954351


   I'm on Linux.
   
   Looks like 0.20.2 indeed works out-of-the-box with the storage from host. I don't quite understand why that is. Other than that it's related to the COPY which overwrites ownerships on the container filesystem, but I thought the volume mounts would still appear as root:root. Clearly I don't quite know what's going on here.
   
   Apparently docker-compose checks the ownership of the first container in which it mounts a volume when creating it, and sets the ownership accordingly. I can also put /opt/data on a named volume if I change the storage mount from `./storage:/opt/data` to `storage:/opt/data` on the druid containers and add the following service as the first thing in the composefile:
   
   ```
     test:
       container_name: test
       build: .
       volumes:
         - storage:/opt/data
       command: ['sleep', '100000']
   ```
   
   with Dockerfile being:
   ```
   FROM ubuntu:20.04
   
   RUN addgroup --system --gid 1000 test \
    && adduser --system --uid 1000 --no-create-home --home /opt/ --shell /bin/sh --gid 1000 test \
    && mkdir -p /opt/data \
    && chown -R test:test /opt
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org