docker compose up 报错

[root@kai]# docker compose up
[+] Running 6/6
 ✔ Network seafile-net          Created                                                                                                                                                          0.1s 
 ✔ Container seafile-memcached  Created                                                                                                                                                          1.3s 
 ✔ Container seafile-mysql      Created                                                                                                                                                          2.5s 
 ✔ Container seafile-caddy      Created                                                                                                                                                          0.3s 
 ✔ Container seafile            Created                                                                                                                                                         68.9s 
 ✔ Container seadoc             Created                                                                                                                                                         62.4s 
Attaching to seadoc, seafile, seafile-caddy, seafile-memcached, seafile-mysql
seafile-caddy      | {"level":"info","ts":1744370170.2480023,"logger":"docker-proxy","msg":"Running caddy proxy server"}
seafile-caddy      | {"level":"info","ts":1744370170.2494226,"logger":"admin","msg":"admin endpoint started","address":"localhost:2019","enforce_origin":false,"origins":["//localhost:2019","//[::1]:2019","//127.0.0.1:2019"]}
seafile-caddy      | {"level":"info","ts":1744370170.2496853,"msg":"autosaved config (load with --resume flag)","file":"/config/caddy/autosave.json"}
seafile-caddy      | {"level":"info","ts":1744370170.2496974,"logger":"docker-proxy","msg":"Running caddy proxy controller"}
seafile-caddy      | {"level":"info","ts":1744370170.250589,"logger":"docker-proxy","msg":"Start","CaddyfilePath":"","EnvFile":"","LabelPrefix":"caddy","PollingInterval":30,"ProxyServiceTasks":true,"ProcessCaddyfile":true,"ScanStoppedContainers":false,"IngressNetworks":"[seafile-net]","DockerSockets":[""],"DockerCertsPath":[""],"DockerAPIsVersion":[""]}
seafile-caddy      | {"level":"info","ts":1744370170.251459,"logger":"docker-proxy","msg":"Connecting to docker events","DockerSocket":""}
seafile-caddy      | {"level":"info","ts":1744370170.2517452,"logger":"docker-proxy","msg":"IngressNetworksMap","ingres":"map[5800049fe97ee2e840a1e92b6a2c1e859cab778eaf26fd133711b4c67b80cdc5:true seafile-net:true]"}
seafile-caddy      | {"level":"info","ts":1744370170.2605453,"logger":"docker-proxy","msg":"Swarm is available","new":false}
seafile-caddy      | {"level":"info","ts":1744370170.260969,"logger":"docker-proxy","msg":"New Caddyfile","caddyfile":"# Empty caddyfile"}
seafile-caddy      | {"level":"warn","ts":1744370170.2613564,"logger":"docker-proxy","msg":"Caddyfile to json warning","warn":"[Caddyfile:1: Caddyfile input is not formatted; run 'caddy fmt --overwrite' to fix inconsistencies]"}
seafile-caddy      | {"level":"info","ts":1744370170.2613766,"logger":"docker-proxy","msg":"New Config JSON","json":"{}"}
seafile-caddy      | {"level":"info","ts":1744370170.2614279,"logger":"docker-proxy","msg":"Sending configuration to","server":"localhost"}
seafile-caddy      | {"level":"info","ts":1744370170.262584,"logger":"admin.api","msg":"received request","method":"POST","host":"localhost:2019","uri":"/load","remote_ip":"127.0.0.1","remote_port":"44058","headers":{"Accept-Encoding":["gzip"],"Content-Length":["41"],"Content-Type":["application/json"],"User-Agent":["Go-http-client/1.1"]}}
seafile-caddy      | {"level":"info","ts":1744370170.2626736,"msg":"config is unchanged"}
seafile-caddy      | {"level":"info","ts":1744370170.2626839,"logger":"admin.api","msg":"load complete"}
seafile-caddy      | {"level":"info","ts":1744370170.262829,"logger":"docker-proxy","msg":"Successfully configured","server":"localhost"}
seafile-mysql      | 2025-04-11 11:16:11+00:00 [Note] [Entrypoint]: Entrypoint script for MariaDB Server 1:10.11.11+maria~ubu2204 started.
seafile-mysql      | 2025-04-11 11:16:12+00:00 [Warn] [Entrypoint]: /sys/fs/cgroup/blkio:/docker/9b5d47a664a4a3e8f95d3c0a7771b133a71b9254b22344ab6c74980b8ce0f060
seafile-mysql      | 10:pids:/docker/9b5d47a664a4a3e8f95d3c0a7771b133a71b9254b22344ab6c74980b8ce0f060
seafile-mysql      | 9:net_prio,net_cls:/docker/9b5d47a664a4a3e8f95d3c0a7771b133a71b9254b22344ab6c74980b8ce0f060
seafile-mysql      | 8:hugetlb:/docker/9b5d47a664a4a3e8f95d3c0a7771b133a71b9254b22344ab6c74980b8ce0f060
seafile-mysql      | 7:perf_event:/docker/9b5d47a664a4a3e8f95d3c0a7771b133a71b9254b22344ab6c74980b8ce0f060
seafile-mysql      | 6:devices:/docker/9b5d47a664a4a3e8f95d3c0a7771b133a71b9254b22344ab6c74980b8ce0f060
seafile-mysql      | 5:cpuset:/docker/9b5d47a664a4a3e8f95d3c0a7771b133a71b9254b22344ab6c74980b8ce0f060
seafile-mysql      | 4:memory:/docker/9b5d47a664a4a3e8f95d3c0a7771b133a71b9254b22344ab6c74980b8ce0f060
seafile-mysql      | 3:cpuacct,cpu:/docker/9b5d47a664a4a3e8f95d3c0a7771b133a71b9254b22344ab6c74980b8ce0f060
seafile-mysql      | 2:freezer:/docker/9b5d47a664a4a3e8f95d3c0a7771b133a71b9254b22344ab6c74980b8ce0f060
seafile-mysql      | 1:name=systemd:/docker/9b5d47a664a4a3e8f95d3c0a7771b133a71b9254b22344ab6c74980b8ce0f060/memory.pressure not writable, functionality unavailable to MariaDB
seafile-mysql      | 2025-04-11 11:16:12+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
seafile-mysql      | 2025-04-11 11:16:12+00:00 [Note] [Entrypoint]: Entrypoint script for MariaDB Server 1:10.11.11+maria~ubu2204 started.
seafile-mysql      | 2025-04-11 11:16:12+00:00 [Note] [Entrypoint]: Initializing database files
seafile-mysql      | 2025-04-11 11:16:12 0 [ERROR] mariadbd: Can't create/write to file '/tmp/ib4xGeeg' (Errcode: 13 "Permission denied")
seafile-mysql      | 2025-04-11 11:16:12 0 [ERROR] InnoDB: Unable to create temporary file; errno: 13
seafile-mysql      | 2025-04-11 11:16:12 0 [ERROR] mariadbd: Can't create/write to file '/tmp/ib11QgdJ' (Errcode: 13 "Permission denied")
seafile-mysql      | 2025-04-11 11:16:12 0 [ERROR] InnoDB: Unable to create temporary file; errno: 13
seafile-mysql      | 2025-04-11 11:16:12 0 [ERROR] InnoDB: Database creation was aborted with error Generic error. You may need to delete the ibdata1 file before trying to start up again.
seafile-mysql      | 2025-04-11 11:16:12 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
seafile-mysql      | 2025-04-11 11:16:12 0 [ERROR] Unknown/unsupported storage engine: InnoDB
seafile-mysql      | 2025-04-11 11:16:12 0 [ERROR] Aborting
seafile-mysql      | 
seafile-mysql      | Installation of system tables failed!  Examine the logs in
seafile-mysql      | /var/lib/mysql/ for more information.
seafile-mysql      | 
seafile-mysql      | The problem could be conflicting information in an external
seafile-mysql      | my.cnf files. You can ignore these by doing:
seafile-mysql      | 
seafile-mysql      |     shell> /usr/bin/mariadb-install-db --defaults-file=~/.my.cnf
seafile-mysql      | 
seafile-mysql      | You can also try to start the mariadbd daemon with:
seafile-mysql      | 
seafile-mysql      |     shell> /usr/sbin/mariadbd --skip-grant-tables --general-log &
seafile-mysql      | 
seafile-mysql      | and use the command line tool /usr/bin/mariadb
seafile-mysql      | to connect to the mysql database and look at the grant tables:
seafile-mysql      | 
seafile-mysql      |     shell> /usr/bin/mariadb -u root mysql
seafile-mysql      |     MariaDB> show tables;
seafile-mysql      | 
seafile-mysql      | Try '/usr/sbin/mariadbd --help' if you have problems with paths.  Using
seafile-mysql      | --general-log gives you a log in /var/lib/mysql/ that may be helpful.
seafile-mysql      | 
seafile-mysql      | The latest information about mysql_install_db is available at
seafile-mysql      | https://mariadb.com/kb/en/installing-system-tables-mysql_install_db
seafile-mysql      | You can find the latest source at https://downloads.mariadb.org and
seafile-mysql      | the MariaDB discuss email list at https://lists.mariadb.org/postorius/lists/discuss.lists.mariadb.org/
seafile-mysql      | 
seafile-mysql      | Please check all of the above before submitting a bug report
seafile-mysql      | at https://mariadb.org/jira
seafile-mysql      | 
Gracefully stopping... (press Ctrl+C again to force)
dependency failed to start: container seafile-mysql exited (1)

报错安装启动不了
seafile-mysql | 2025-04-11 11:23:45 0 [ERROR] mariadbd: Can’t create/write to file ‘/tmp/ibMYOnaW’ (Errcode: 13 “Permission denied”)
seafile-mysql | 2025-04-11 11:23:45 0 [ERROR] InnoDB: Unable to create temporary file; errno: 13
seafile-mysql | 2025-04-11 11:23:45 0 [ERROR] mariadbd: Can’t create/write to file ‘/tmp/iblO6dRW’ (Errcode: 13 “Permission denied”)
seafile-mysql | 2025-04-11 11:23:45 0 [ERROR] InnoDB: Unable to create temporary file; errno: 13
seafile-mysql | 2025-04-11 11:23:45 0 [ERROR] InnoDB: Database creation was aborted with error Generic error. You may need to delete the ibdata1 file before trying to start up again.
seafile-mysql | 2025-04-11 11:23:46 0 [ERROR] Plugin ‘InnoDB’ registration as a STORAGE ENGINE failed.
seafile-mysql | 2025-04-11 11:23:46 0 [ERROR] Unknown/unsupported storage engine: InnoDB
seafile-mysql | 2025-04-11 11:23:46 0 [ERROR] Aborting

可以检查下数据库的数据目录权限

db:
image: ${SEAFILE_DB_IMAGE:-mariadb:10.11}
container_name: seafile-mysql
command: sh -c “mkdir -p /tmp && chmod 777 /tmp && docker-entrypoint.sh mysqld”

增加了command这句就好了