
如果你使用 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/fbraz3/lemp-docker/actions/workflows/base-images.yml/badge.svg](https://github.com/fbraz3/lemp-docker/actions/workflows/base-images.yml) https://github.com/fbraz3/lemp-docker/actions/workflows/phalcon-images.yml/badge.svg](https://github.com/fbraz3/lemp-docker/actions/workflows/phalcon-images.yml) , commonly referred to as LEMP.
It is designed to simplify the deployment of PHP applications with a robust and modern environment, offering both Development and Production versions to meet different deployment needs.
The images are built on top of other modular images from the fbraz3 ecosystem, ensuring flexibility, maintainability, and ease of use.
💡 For a complete list of available images, please visit the https://github.com/fbraz3/php-system-docs page.
This project provides two distinct versions for different use cases:
-dev suffix)/pma/ endpointThe image follows a consistent tagging scheme:
fbraz3/lnmp:{php_version} (e.g., 8.2, 8.3, 8.4)fbraz3/lnmp:{php_version}-dev (e.g., 8.2-dev, 8.3-dev)fbraz3/lnmp:{php_version}-phalcon (e.g., 8.2-phalcon, 8.3-phalcon)fbraz3/lnmp:{php_version}-phalcon-dev (e.g., 8.2-phalcon-dev)fbraz3/lnmp:latest - Latest production versionfbraz3/lnmp:latest-dev - Latest development versionfbraz3/lnmp:latest-phalcon - Latest Phalcon production versionfbraz3/lnmp:latest-phalcon-dev - Latest Phalcon development versionamd64 and arm64 architecturesfbraz3/lemp:{tag}This image supports multiple flavors to cater to different use cases:
Perfect for local development with easy database access and debugging tools.
yaml# docker-compose.yml services: web: image: fbraz3/lnmp:8.4-dev # or fbraz3/lnmp:8.4-phalcon-dev volumes: - ./:/app/public/ ports: - "127.0.0.1:80:80" - "127.0.0.1:3306:3306"
Access Points:
http://localhost/http://localhost/pma/localhost:3306 (user: root, password: empty)Secure configuration suitable for production environments.
yaml# docker-compose.yml services: web: image: fbraz3/lnmp:8.4 # or fbraz3/lnmp:8.4-phalcon environment: - MYSQL_ROOT_PASSWORD=your_secure_password_here - MYSQL_APP_DATABASE=my_application # Optional: create app database - MYSQL_APP_USER=app_user # Optional: create app user - MYSQL_APP_USER_PASSWD=app_password # Optional: app user password volumes: - ./:/app/public/ - mysql_data:/var/lib/mysql ports: - "80:80" restart: unless-stopped volumes: mysql_data:
Access Points:
http://your-domain/root, password: set via environment)Important: Always set a strong MYSQL_ROOT_PASSWORD in production!
The production images support executing custom SQL scripts during container startup. This feature allows you to initialize your database with custom schema, data, or configuration.
.sql files in a directory on your host system/sql-scripts in the container.sql files in the directory will be executed automatically during first startupyaml# docker-compose.yml services: web: image: fbraz3/lnmp:8.4 environment: - MYSQL_ROOT_PASSWORD=your_secure_password_here volumes: - ./:/app/public/ - ./sql-scripts:/sql-scripts # Mount your custom SQL scripts - mysql_data:/var/lib/mysql ports: - "80:80" restart: unless-stopped
bash# Directory structure example project/ ├── sql-scripts/ │ ├── 01-create-users.sql │ ├── 02-create-tables.sql │ └── 03-insert-data.sql └── docker-compose.yml
01-, 02-) to control execution order| Variable | Required | Default | Description |
|---|---|---|---|
MYSQL_ROOT_PASSWORD | Yes | defaultrootpassword | Root password for MariaDB |
MYSQL_APP_DATABASE | No | - | Create application database |
MYSQL_APP_USER | No | - | Create application user |
MYSQL_APP_USER_PASSWD | No | - | Password for application user |
Example:
bashdocker run -e MYSQL_ROOT_PASSWORD=mySecurePassword123 \ -e MYSQL_APP_DATABASE=my_app \ -e MYSQL_APP_USER=app_user \ -e MYSQL_APP_USER_PASSWD=app_secure_password \ fbraz3/lnmp:8.4
Note:
MYSQL_APP_USER and MYSQL_APP_USER_PASSWD are provided, the user will be granted full privileges on the database specified by MYSQL_APP_DATABASE (if provided).MYSQL_APP_USER and MYSQL_APP_USER_PASSWD must be used together. Creating a user without a password is a security risk and is not supported.Development images don't require any specific environment variables and work out of the box.
This image allows you to customize PHP directives using environment variables.
For detailed instructions, refer to the https://github.com/fbraz3/php-fpm-docker#manage-php-directives-via-environment-variables.
Cronjobs can be configured by binding a file to /cronfile in the container. The system will automatically install and execute the jobs.
For more details, see the https://github.com/fbraz3/php-fpm-docker#cronjobs.
To enable email sending, this image relies on the configuration provided in the php-base-docker project.
Follow the instructions in the https://github.com/fbraz3/php-base-docker#sending-mails to set up email functionality.
Contributions are welcome! Feel free to open issues or submit pull requests to improve the project.
Please visit the CONTRIBUTING.md file for guidelines on how to contribute to this project.
Useful links
I spend a lot of time and effort maintaining this project. If you find it useful, *** supporting me with a ***:
This project is licensed under the Apache License 2.0, so you can use it for personal and commercial projects. However, please note that the images are provided "as is" without any warranty or guarantee of any kind. Use them at your own risk.
以下是 fbraz3/lnmp 相关的常用 Docker 镜像,适用于 不同场景 等不同场景:
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
来自真实用户的反馈,见证轩辕镜像的优质服务