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:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]