chengshiwen commented on issue #5526:
URL:
https://github.com/apache/dolphinscheduler/issues/5526#issuecomment-853739960
@s348268281 In 1.3.6 of docker, it is best to use a tenant named `root`,
otherwise it may cause Permission denied problems.
As for volume, you can add the ` - ${PWD}/data:/opt/data` for
`dolphinscheduler-worker volumes` in `docker-compose.yml` like:
```yaml
dolphinscheduler-worker:
image: apache/dolphinscheduler:latest
command: worker-server
environment:
TZ: Asia/Shanghai
env_file: config.env.sh
healthcheck:
test: ["CMD", "/root/checkpoint.sh", "WorkerServer"]
interval: 30s
timeout: 5s
retries: 3
depends_on:
- dolphinscheduler-postgresql
- dolphinscheduler-zookeeper
volumes:
- dolphinscheduler-worker-data:/tmp/dolphinscheduler
- dolphinscheduler-logs:/opt/dolphinscheduler/logs
- dolphinscheduler-shared-local:/opt/soft
- dolphinscheduler-resource-local:/dolphinscheduler
- ${PWD}/data:/opt/data
restart: unless-stopped
networks:
- dolphinscheduler
```
After running `docker-compose up -d`, you can create a python task with the
tenant named `root`:
```python
with open('/opt/data/test.txt', 'w') as f:
f.write('hello world\n')
```
After the task runs successfully, you can view `cat data/test.txt` on the
host
--
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]