https://github.com/haixeefrontend/hbuilderx-docker
DCloud HBuilderX (Linux) in Docker for CI use
https://github.com/haixeefrontend/hbuilderx-docker
docker-image hbuilderx uniapp uniapp-cli
Last synced: 2 months ago
JSON representation
DCloud HBuilderX (Linux) in Docker for CI use
- Host: GitHub
- URL: https://github.com/haixeefrontend/hbuilderx-docker
- Owner: haixeefrontend
- License: agpl-3.0
- Created: 2025-11-06T02:46:48.000Z (7 months ago)
- Default Branch: master
- Last Pushed: 2026-04-07T06:48:55.000Z (2 months ago)
- Last Synced: 2026-04-07T07:23:26.010Z (2 months ago)
- Topics: docker-image, hbuilderx, uniapp, uniapp-cli
- Language: Dockerfile
- Homepage:
- Size: 64.5 KB
- Stars: 1
- Watchers: 0
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
HBuilderX Linux Docker Image
[](https://github.com/haixeefrontend/hbuilderx-docker/actions/workflows/ci.yml)
[](https://github.com/haixeefrontend/hbuilderx-docker/releases/latest)
这个仓库包含了用于构建 [HBuilderX](https://hx.dcloud.net.cn/) 的 [Linux](https://hx.dcloud.net.cn/Tutorial/install/linux-cli) 版本 Docker 镜像的配置文件和脚本。
此外这个仓库包含了 GitHub Actions 工作流配置文件,用于在云端构建 Docker 镜像并发布到 GitHub Release。
## 使用说明
使用以下命令构建 Docker 镜像:
```bash
docker build . -t hbuilderx:latest
```
构建 slim 版本的镜像,这个版本仅保留基础的编译到 app 包所需的工具:
```bash
docker build --build-arg SLIM=true . -t hbuilderx:slim
```
构建完成后,可以使用 docker run 命令运行容器,并将项目目录挂载到容器中:
```bash
docker run --rm -it \
-v /path/to/your/project:/project \
-w /project \
hbuilderx:latest
```
当容器输出 `✅ HBuilderX started.`,表明 HBuilderX 在后台启动。
此时可以运行 HBuilderX 编译命令,如导出 app 发布资源(需要登录)
```bash
cli user login --username "" --password ""
cli project open --path "$(pwd)"
cli publish --platform APP --type appResource --project project
```
更多命令请参考 [HBuilderX CLI 文档](https://hx.dcloud.net.cn/cli/README)。
## License
本项目采用 AGPL-3.0 许可证,详情请参阅 [LICENSE](./LICENSE) 文件。