环境
- EMQX 版本:5.8.2
- 操作系统版本:Ubuntu 22.04 desktop
人菜,看不懂很多黑话… 我有看到这帖子, 状况好像差不多
重现此问题的步骤
ubu@ubu-AIR-101:~$ sudo docker run -d --name emqx -p 1883:1883 -p 8083:8083 -p 8084:8084 -p 8883:8883 -p 18083:18083 emqx:5.8.2
324e21da35bf97f32adf40678593135a9dd7928cb2c0666d74015b5ef9db8ee5
ubu@ubu-AIR-101:~$ sudo docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
324e21da35bf emqx:5.8.2 “/usr/bin/docker-ent…” 6 seconds ago Up 6 seconds 4370/tcp, 0.0.0.0:1883->1883/tcp, :::1883->1883/tcp, 0.0.0.0:8083-8084->8083-8084/tcp, :::8083-8084->8083-8084/tcp, 0.0.0.0:8883->8883/tcp, :::8883->8883/tcp, 0.0.0.0:18083->18083/tcp, :::18083->18083/tcp, 5369/tcp emqx
7426e9cd2460 nodered/node-red “./entrypoint.sh” 17 hours ago Up 2 hours (healthy) 0.0.0.0:1880->1880/tcp, :::1880->1880/tcp mynodered
ubu@ubu-AIR-101:~$ sudo docker stop 3
3
ubu@ubu-AIR-101:~$ sudo docker rm 3
3
以上是没有配置挂载(数据卷?)正常启动的样子
ubu@ubu-AIR-101:~$ sudo docker run -d --name emqx
-p 1883:1883 -p 8083:8083
-p 8084:8084 -p 8883:8883
-p 18083:18083
-v $PWD/emqx/data:/opt/emqx/data
-v $PWD/emqx/log:/opt/emqx/log
emqx:5.8.2
e945bd74a19dd7bee549c9d69cd8710dacd273da2b79445d94c6cc77616e9347
ubu@ubu-AIR-101:~$ sudo docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
e945bd74a19d emqx:5.8.2 “/usr/bin/docker-ent…” 7 seconds ago Exited (1) 4 seconds ago emqx
7426e9cd2460 nodered/node-red “./entrypoint.sh” 17 hours ago Up 2 hours (healthy) 0.0.0.0:1880->1880/tcp, :::1880->1880/tcp mynodered
预期行为
我是希望看到他开启后和没有指定挂载一样的running
实际行为
一瞬间就exit了, 并且下sudo docker start指令也是一样立刻exit
container没启动所以也没日志能看
ubu@ubu-AIR-101:~$ sudo docker logs 0e
mkdir: cannot create directory ‘/opt/emqx/data/configs’: Permission denied