Files
aiot-uniapp/docker.md
feige996 4e3942eca8 feat(docker): 添加docker相关配置和文档
添加Dockerfile、.dockerignore、nginx.conf配置文件
新增docker.md文档说明构建和运行步骤
更新.vscode设置支持docker文件嵌套
2025-09-17 10:37:59 +08:00

26 lines
541 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

## Docker
根据提供的 `Dockerfile`,可以通过以下步骤构建并运行镜像:
### 1. 构建Docker镜像
在项目根目录执行以下命令:
- `-t unibest:v1-2025091701`:为镜像指定名称和标签
- `.`表示使用当前目录的Dockerfile
```bash
docker build -t unibest:v1-2025091701 .
```
### 2. 运行Docker容器
使用以下命令运行容器:
```bash
docker run -d -p 80:80 unibest:v1-2025091701
```
- `-d`:表示在后台运行容器
- `-p 80:80`将容器的80端口映射到主机的80端口