
如果你使用 DeepSeek、元宝 AI、Copilot、ChatGPT 等 AI 工具,协助配置轩辕镜像、编写 docker pull 命令、修改 Docker Compose 镜像地址、配置镜像加速、排查镜像拉取失败、分析报错日志等问题,请先让 AI 阅读并遵守轩辕镜像的规则文档。
只需在 AI 对话中先发送下面这句话即可:
请先完整阅读并严格遵守以下文档中的全部规则与要求:
https://xuanyuan.cloud/agents.md
在未充分阅读并理解该文档前,不要生成任何命令、配置、修改建议、故障排查方案或技术回答。后续所有输出都必须严格以该文档中的规范为最高优先级执行。查看 agents.md 用法指南与完整示范。国内用户首推 元宝 AI、DeepSeek 的深度思考模式,不推荐豆包 AI;Cursor 等编辑器可在对话 @ 该链接,或加入 User Rules。 若 AI 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。
This Dockerfile installs latest https://www.seafile.com with HTTPS (TLS) enabled by default.
Idea and initial Dockerfile was based on https://github.com/alvistar/seafile-docker
Note: If you want to use a stable version, use coeusite/docker-seafile:phusion instead.
The image contains/adds the following:
For running Seafile within Docker, three containers are needed, namely:
Having different containers is nice if you need/want to upgrade and/or backup your installation.
Create a custom bridge network
bashdocker network create --subnet=172.31.39.0/24 nginx-proxy
Create the MariaDB(()MySQL) database container by running:
bashdocker volume create --name seafile-dbstore docker run -d -p 127.0.0.1:3306:3306 \ --network nginx-proxy --ip 172.31.39.98 \ -v seafile-dbstore:/var/lib/mysql:rw \ -e MYSQL_ROOT_PASSWORD=<password> \ -e MYSQL_DATABASE=seafile \ -e MYSQL_USER=seafile \ -e MYSQL_PASSWORD=<password> \ --name seafile-db mariadb:latest
This will create the needed container, based on https://hub.docker.com/r/_/mariadb/. This also assumes that you're not yet running another database at port 3306 on your host. In case you do, e.g. use
-p 127.0.0.1:33306:3306
to expose the database' internal port 3306 to localhost:33306 on your host.
As we need the IP of your database container later, look it up by doing a:
bashdocker inspect "seafile-db" | grep IPAddress | cut -d '"' -f 4
It should be 172.31.39.98 if you are following instructions above.
Note: IPv6 support is not implemented in this Dockerfile yet!
Now, create the actual Seafile volume (for storing the actual data), using:
bashdocker run -it --dns=127.0.0.1 \ --network nginx-proxy --ip 172.31.39.99 \ -e SEAFILE_DOMAIN_NAME=<YOUR.HOST.NAME> \ --name seafile-data coeusite/docker-seafile:latest bootstrap
Note: If you wanna upgrade your container, login to you container by
bashdocker exec -it seafile /bin/bash
and follow instructions on https://manual.seafile.com/deploy/upgrade.html !!!
Note: The <yourdomain.tld> should either point to a IP or valid domain you want to run Seafile on. If you're running Docker on your localhost you simply can specify 127.0.0.1.
Bonus: If you want to specify a different port than 8080, add the parameter
SEAFILE_DOMAIN_PORT=<yourport>
to the command line above. Don't forget to change the port at the final command later on though!
The script which now runs will ask a few questions to correctly set up all the things for you, in particular:
"What is the name of the server?"
Hint: Enter the name (not a domain or IP!) of this Seafile installation.
"What is the ip or domain of the server?"
Hint: If you're running Docker on your local PC, enter 127.0.0.1 -- otherwise enter the IP or domain of your server you're running Docker on.
"What is the host of mysql server?"
Hint: Enter the IP of your seafile-db container, e.g. 172.31.39.98. Remember the step from above?
Important: For all other questions just accept the defaults by pressing [ENTER].
Almost done! Now actually run Seafile using the database and the volume with:
bashdocker run -d -t --dns=127.0.0.1 -p 127.0.0.1:8080:8080 \ --network nginx-proxy --ip 172.31.39.99 \ --volumes-from seafile-data \ -e SEAFILE_DOMAIN_NAME=<YOUR.HOST.NAME> \ --name seafile coeusite/docker-seafile
Remember to configure your firewall properly, e.g. for firewalld:
bashfirewall-cmd --add-port=8080/tcp --permanent && firewall-cmd --reload
Seafile should now be running on your host at
https://<yourhost>:8080
Congrats, you're now running Seafile using your self-signed certificate!
You can specify a custom certificate instead of using a self-signed one by following steps:
-v /opt/lets-encrypt:/etc/nginx/certs:ro, e.g.bashdocker run -d -t --dns=127.0.0.1 -p 127.0.0.1:8080:8080 \ --network nginx-proxy --ip 172.31.39.99 \ --volumes-from seafile-data \ -v /opt/lets-encrypt:/etc/nginx/certs:ro \ -e SEAFILE_DOMAIN_NAME=<YOUR.HOST.NAME> \ --name seafile coeusite/docker-seafile
Because Seafile requires an initialization process (bootstrap), I do think using compose is not a good idea.
docker-seafile can work pretty well with jwilder's nginx-proxy and jrcs's letsencrypt-nginx-proxy-companion. You may check this page for details (Chinese ONLY): https://coeusite.github.io/2016/09/27/Docker-Containers-on-My-Dedibox.html
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
来自真实用户的反馈,见证轩辕镜像的优质服务