
如果你使用 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 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。
Created by Kaushal Kishore
Original repo:https://github.com/kaushalkishorejaiswal/Docker-Centos-LEMP
Forked by Fuseteam
*** ***
Steps for creating image from the Docker-LEMP:
Step 1 : Clone the Docker-Centos-LEMP.git
Command: git clone https://github.com/fuseteam/Docker-Centos-LEMP.git
Step 2 : Change the directory to the clone folder
Command: cd Docker-Centos-LEMP
Step 3 : Create the Docker Image
Command: sudo docker build -t ##NAME_OF_YOUR_DOCKER_IMAGE## .
Note : a). This command will be fired where the DockerFile will be placed b). ##NAME_OF_YOUR_DOCKER_IMAGE## : Replace it with your image name c). . : (.) Symbols shows that your Dockerfile is available on the same directory where you are running the command.
Step 4 : Create an Nginx,PHP,MariaDB Installed Container from the image Command Syntax: sudo docker run --name [container name] -p [port to access (New Port):port exposed(original port)] -i -t [image name]
Command: sudo docker run --name ##NAME_OF_YOUR_DOCKER_CONTAINER## -d -p 8082:80 -p3307:3306 ##NAME_OF_YOUR_DOCKER_IMAGE##
Step 5 : Now you can access your nginx container from your web browser.
Command: http://127.0.0.1:8082/
Step 6 : You can access your MariaDB using the below command.
Command: mysql -uroot -proot -h172.17.42.1
Important Notes
Some other important commands:
Additional Notes:
docker images are used to create containers any changes to a container exists as long as the container is running changes in a container can be preserved by creating a new image from the container many containers can be created from one imagechanges made in a container can be 'saved' by creating an image from
that container with the following command
Command Syntax:
docker commit -m "
Command Example: docker commit -m "changed mysql to mariadb" webapp
database changes are not saved this way To persist database changes use docker volumes
Command for attaching the volume of your hosted machine:
Command Syntax: sudo docker run --name ##NAME_OF_YOUR_DOCKER_CONTAINER## -d -p 8082:80 -v ##HOSTED_VOLUME_LOCATION##:##CONTAINER_VOLUME_LOCATION## ##YOUR_IMAGE_NAME##
Command Example: sudo docker run --name nginx_ins -d -p 8082:80 -v /home/mysqldata:/var/lib/mysql clemp
any container that needs to make use of the same database should specify the database password via the PASSWORD enviroment variable, the container_run script makes it easier to do so. The docker volume can be sit anywhere including a different machine than the container runs on. See https://docs.docker.com/storage/volumes/#use-a-volume-driver for details. Additionally when moving the data directory the directory permissions should be preserved, otherwise subquentent databases will not be able to access it. The correct permissions can be verified after the first data directory is created with
ls -l
shell access to a container can be gained with the following command
docker exec -it ##container-name bash
containers can be stopped with the following command
docker stop ##container-name
stopped containers can be started again with the following command
docker start ##container-name
a prebuild image of this configuration can be pulled with the following command
docker pull fuseteam/lemp
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
来自真实用户的反馈,见证轩辕镜像的优质服务