docker-compose 启动emqx启动不起来,请帮忙看下配置

以下为docker-compose.yml配置文件

version: “3.7”
services:
mqtt:
image: emqx/emqx:5.0.6
container_name: mqtt
privileged: true
restart: always
ports:
- 1883:1883
- 8083:8083
- 8084:8084
- 18083:18083
volumes:
- ./data:/opt/emqx/data
- ./log:/opt/emqx/log

容器报错信息:2022-12-15T15:33:33.832983780Z mkdir: cannot create directory ‘/opt/emqx/data/configs’: Permission denied
2022-12-15T15:33:35.238799933Z mkdir: cannot create directory ‘/opt/emqx/data/configs’: Permission denied
2022-12-15T15:33:36.609118847Z mkdir: cannot create directory ‘/opt/emqx/data/configs’: Permission denied
2022-12-15T15:33:38.204559011Z mkdir: cannot create directory ‘/opt/emqx/data/configs’: Permission denied
2022-12-15T15:33:40.208791983Z mkdir: cannot create directory ‘/opt/emqx/data/configs’: Permission denied
2022-12-15T15:33:42.975124414Z mkdir: cannot create directory ‘/opt/emqx/data/configs’: Permission denied
2022-12-15T15:33:47.393262692Z mkdir: cannot create directory ‘/opt/emqx/data/configs’: Permission denied
2022-12-15T15:33:54.942378576Z mkdir: cannot create directory ‘/opt/emqx/data/configs’: Permission denied
2022-12-15T15:34:08.951679828Z mkdir: cannot create directory ‘/opt/emqx/data/configs’: Permission denied
2022-12-15T15:34:35.745160614Z mkdir: cannot create directory ‘/opt/emqx/data/configs’: Permission denied

这是没有创建目录的权限,跟配置没有关系。

谢谢,已解决

你咋解决的 我现在也有这个问题