
如果你使用 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 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。
https://github.com/LycheeOrg/Lychee-Docker/actions/workflows/nightly.yml
https://github.com/LycheeOrg/Lychee-Docker/commits/master
https://hub.docker.com/r/lycheeorg/lychee
https://hub.docker.com/r/lycheeorg/lychee
https://hub.docker.com/r/lycheeorg/lychee-laravel
This image features Lychee, nginx and PHP-FPM. The provided configuration (PHP, nginx...) follows Lychee's official recommendations.
The following tags are available :
latest: Latest Lychee releasev[NUMBER]: Stable version tag for a Lychee releasenightly (also dev): Current master branch tag (Lychee operates on a stable master, so this should usually be safe)devtools: As above, but includes development dependenciestesting: Tag for testing new branches and pull requests. Designed for internal use by LycheeOrgalpha: Current alpha branch tag (The alpha branch contains bleeding edge changes that are not peer-reviewed)alpha-devtools: As above, but includes development dependenciesTo use the built-in SQLite support, no external dependencies are required. At its simplest, docker run -p 80 lycheeorg/lychee:dev will start Lychee listening on a random port on the local host.
For more runtime options, look below in Run with Docker and Available environment variables and defaults.
To use this image with MySQL, MariaDB or PostgreSQL you will need a suitable database running externally. This may be through a Docker image, possibly in your docker-compose.yml.
docker run / docker-compose or.env file with the appropriate info and mount it to /conf/.env or-e DB_CONNECTION= on the command line and connecting to the container with your browserMake sure that you link to the container running your database !!
The example below shows --net and --link for these purposes. --net connects to the name of the network your database is on and --link connects to the database container.
bashdocker run -d \ --name=lychee \ -v /host_path/lychee/conf:/conf \ -v /host_path/lychee/uploads:/uploads \ -v /host_path/lychee/sym:/sym \ -e PUID=1000 \ -e PGID=1000 \ -e PHP_TZ=America/New_York \ -e TIMEZONE=America/New_York \ -e DB_CONNECTION=mysql \ -e DB_HOST=mariadb \ -e DB_PORT=3306 \ -e DB_DATABASE=lychee \ -e DB_USERNAME=user \ -e DB_PASSWORD=password \ -p 90:80 \ --net network_name \ --link db_name \ lycheeorg/lychee
Warning : if you use a MySQL database, make sure to use the mysql_native_password authentication plugin, either by using the --default-authentication-plugin option when starting mysql, or by running a query to enable the authentication plugin for the lychee user, e.g. :
alter user 'lychee' identified with mysql_native_password by '<your password>';
Change the environment variables in the https://github.com/LycheeOrg/Lychee-Docker/blob/master/docker-compose.yml to reflect your database credentials.
Note that in order to avoid writing credentials directly into the file, you can create a db_secrets.env and use the env_file directive (see the docs).
When ADMIN_USER and ADMIN_PASSWORD (or ADMIN_PASSWORD_FILE) are set an admin user will be created with those credentials during the first run. Otherwise Lychee will prompt in the browser when first loaded.
As an alternative to passing sensitive information via environment variables, _FILE may be appended to some of the environment variables, causing the initialization script to load the values for those variables from files present in the container. In particular, this can be used to load passwords from Docker secrets stored in /run/secrets/<secret_name> files.
If both the original variable and the _FILE (e.g. both DB_PASSWORD and DB_PASSWORD_FILE) are set, the original variable will be used.
The following _FILE variables are supported:
If you do not provide environment variables or .env file, the https://github.com/LycheeOrg/Lychee/blob/master/.env.example will be used with some values already set by default.
Some variables are specific to Docker, and the default values are :
PUID=1000PGID=1000USER=lycheePHP_TZ=UTCSTARTUP_DELAY=0Note that nginx will accept by default images up to 100MB (client_max_body_size 100M) and that PHP parameters are overridden according to the https://lycheeorg.github.io/docs/faq.html#i-cant-upload-large-photos.
You may still want to further customize PHP configuration. The first method is to mount a custom php.ini to /etc/php/8.2/fpm/php.ini when starting the container. However, this method is kind of brutal as it will override all parameters. It will also need to be remapped whenever an image is released with a new version of PHP.
Instead, we recommend to use the PHP_VALUE directive of PHP-FPM to override specific parameters. To do so, you will need to mount a custom nginx.conf in your container :
fastcgi_param PHP_VALUE [...]client_max_body_size)/etc/nginx/nginx.confIf you need to add (not change) nginx directives, files mounted in /etc/nginx/conf.d/ will be included in the http context.
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
来自真实用户的反馈,见证轩辕镜像的优质服务
以下是 lycheeorg/lychee 相关的常用 Docker 镜像,适用于 不同场景 等不同场景: