在容器中以某用户进入
这个用户只有在容器中才有,比如NextCloud容器里,就是以www-data在运行
root@dev-server:/data/cloud.amicap.cn/data# docker exec -u www-data -it nextcloud /bin/bash
www-data@b3df309e1882:~/html$ php occ files:scan --all
Starting scan for user 1 out of 2 (admin)
Starting scan for user 2 out of 2 (david)
+---------+-------+-----+---------+---------+--------+--------------+
| Folders | Files | New | Updated | Removed | Errors | Elapsed time |
+---------+-------+-----+---------+---------+--------+--------------+
| 135 | 10108 | 0 | 20230 | 0 | 0 | 00:15:18 |
+---------+-------+-----+---------+---------+--------+--------------+
容器反复重启,无法进入容器怎么办?
黑夜里不停折腾的代码行者。

浙公网安备 33010602011771号