
如果你使用 DeepSeek、元宝 AI、Copilot、ChatGPT 等 AI 工具,协助配置轩辕镜像、编写 docker pull 命令、修改 Docker Compose 镜像地址、配置镜像加速、排查镜像拉取失败、分析报错日志等问题,请先让 AI 阅读并遵守轩辕镜像的规则文档。
只需在 AI 对话中先发送下面这段话即可:
请先阅读并遵守:https://xuanyuan.cloud/agents.md
未读文档前不要生成 pull 命令或排错方案。查看 agents.md 用法指南与完整示范。国内用户首推 元宝 AI、DeepSeek 的深度思考模式,不推荐豆包 AI;Cursor 等编辑器可在对话 @ 该链接,或加入 User Rules。 若 AI 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。
🔋 (PHP / Laravel) Production-ready Docker images with automatic Laravel installer.
The Docker images are available for both Debian and Alpine versions.
Our PHP Docker images, available on https://hub.docker.com/r/shinsenter/php, are designed for easy configuration of PHP and PHP-FPM settings via environment variables. This approach eliminates the need to rebuild images when making configuration changes.
These images also come with the latest version of [***] enabling you to start projects quickly without additional installations.
Check out https://hub.docker.com/r/shinsenter/php to learn how to customize these Docker images for your projects.
When you mount an empty directory into the container, it will automatically download the entire source code for the framework, allowing you to bootstrap a new project quickly.
shellmkdir laravel
shelldocker run -p 80:80 -p 443:443 -p 443:443/udp \ -v ./laravel:/var/www/html \ shinsenter/laravel:latest
The container will detect the empty directory mounted to /var/www/html and clone the framework source code into it.
You can mount your application code from your host machine to the /var/www/html directory inside the container.
Because the source code is mounted as a volume, any changes made on the host machine will be reflected inside the container. This setup allows you to run builds, tests, and other tasks within the container while keeping your code on the host.
The Docker images come with pre-generated SSL certificate files for testing HTTPS locally:
To use valid HTTPS certificates for your production website, replace these files with your own valid SSL certificates. You can do this by copying or mounting your certificates from the host machine into the container. Simply overwrite the default certificate files with your valid certificate and key files to enable true HTTPS for your production website.
Using Dockerfile
DockerfileFROM shinsenter/laravel:latest # Copy your own certs into the container COPY my_domain.crt /etc/ssl/site/server.crt COPY my_domain.key /etc/ssl/site/server.key # Add your instructions here # For example: # ADD --chown=$APP_USER:$APP_GROUP ./laravel/ /var/www/html/
Using docker run
shelldocker run -p 80:80 -p 443:443 -p 443:443/udp \ -v ./laravel:/var/www/html \ -v ./my_domain.crt:/etc/ssl/site/server.crt \ -v ./my_domain.key:/etc/ssl/site/server.key \ shinsenter/laravel:latest
Using docker-compose
ymlservices: web: image: shinsenter/laravel:latest volumes: - ./laravel:/var/www/html - ./my_domain.crt:/etc/ssl/site/server.crt - ./my_domain.key:/etc/ssl/site/server.key
You can optionally set the following environment variables in the container to enable certain services to run alongside the web server.
📝 Note: you'll need to install the required packages and create the necessary configs yourself for features like Laravel Pulse, Laravel Horizon or Laravel Reverb.
| Environment Variable | Description |
|---|---|
LARAVEL_AUTO_MIGRATION | Whether to automatically run database migrations when the app boots. Set to 0 to disable running migration. Default is 1. |
LARAVEL_AUTO_MIGRATION_OPTIONS | Additional options/flags to pass to the artisan migrate command (e.g. --seed). |
LARAVEL_ENABLE_QUEUE_WORKER | Enables supervisor service for the Laravel queue worker. Set to 1 to start processing jobs. Default is 0. |
LARAVEL_QUEUE_WORKER_OPTIONS | Defines custom options for the Laravel queue worker (e.g., connection, delay). |
LARAVEL_ENABLE_SCHEDULER | Enables supervisor service for the Laravel scheduler. Set to 0 to disable running scheduled tasks. Default is 1. |
LARAVEL_SCHEDULER_OPTIONS | Specifies additional options for the scheduler execution. |
LARAVEL_ENABLE_HORIZON | Enables supervisor service for Laravel Horizon, a dashboard for managing queues. Default is 0. |
LARAVEL_HORIZON_OPTIONS | Options for customizing Laravel Horizon behavior (e.g., environment, queue names). |
LARAVEL_ENABLE_PULSE | Enables supervisor service for Laravel Pulse for application performance monitoring. Default is 0. |
LARAVEL_PULSE_OPTIONS | Configuration options for Laravel Pulse (e.g., port, storage). |
LARAVEL_ENABLE_REVERB | Enables supervisor service for Laravel Reverb for real-time WebSocket communication. Default is 0. |
LARAVEL_REVERB_OPTIONS | Configuration options for Laravel Reverb (e.g., port, storage). |
The release versions on https://code.shin.company/php don't guarantee that Docker images built from the same source code will always be identical.
We build new Docker images daily to ensure they stay up-to-date with the latest upstream updates for PHP, base OS, Composer, etc. The images in this repo are regularly updated under the same tag names.
But you can pull the image from shinsenter/laravel:latest,
and tag it with a name that indicates its stability,
such as your-repo/laravel:stable using the below commands:
shelldocker pull shinsenter/laravel:latest docker tag shinsenter/laravel:latest your-repo/laravel:stable docker push your-repo/laravel:stable
Then use the image your-repo/laravel:stable as a base image to build containers for production.
If you find these images useful, *** donating via *** or opening an issue on https://code.shin.company/php/issues/new.
Your support helps maintain and improve these images for the community.
This project is licensed under the terms of the https://code.shin.company/php/blob/main/LICENSE.
Thank you for recognizing the intellectual effort behind this project. If you plan to use or build upon any of its ideas, I kindly ask that you give appropriate credit.
From Vietnam 🇻🇳 with love.
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
来自真实用户的反馈,见证轩辕镜像的优质服务