I have asked this question in general community. In order to not repeat, I am just pasting the link here. Any pointers would be appreciated. The problem is similar in both - Jira and Confluence containers. The permission issue. I am not sure why the host folders "data" and "logs" are created with the uid of root. I am on Debian stable.
It is very unpredictable. However my current setup works with one Jira DC node. I run into other issues when using multiple nodes.
Currently I am using volumes instead of mapping directories. And Jira version 9.4.2 which is LTS I guess.