Update docker-build.md

This commit is contained in:
Alireza Jahanshahlou 2025-10-12 17:30:40 +03:30 committed by GitHub
parent d55ae6e398
commit 93588db604
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,21 +1,21 @@
# 本地编译docker镜像方法
# Local compilation docker image method
现在本项目已经使用github自动编译docker功能,本文档是提供给有本地编译docker镜像需求的朋友准备的。
This project now uses GitHub's automatic compilation of Docker images. This document is provided for friends who need to compile Docker images locally.
1、安装docker
1. Install Docker
```
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
```
2、编译docker镜像
2. Compile Docker image
```
#进入项目根目录
# 编译server
#Enter the project root directory
# Compile the server
docker build -t xiaozhi-esp32-server:server_latest -f ./Dockerfile-server .
# 编译web
# Compile web
docker build -t xiaozhi-esp32-server:web_latest -f ./Dockerfile-web .
# 编译完成后,可以使用docker-compose启动项目
# docker-compose.yml你需要修改成自己编译的镜像版本
# After compilation is complete, you can use docker-compose to start the project
# You need to modify docker-compose.yml to the image version you compiled yourself
cd main/xiaozhi-server
docker-compose up -d
```