| Name | Date | Size | #Lines | LOC | ||
|---|---|---|---|---|---|---|
| .. | - | - | ||||
| CHANGELOG.md | D | 12-May-2024 | 399 | 21 | 10 | |
| CHANGELOG_en.md | D | 12-May-2024 | 559 | 23 | 12 | |
| Readme-en.md | D | 12-May-2024 | 2.6 KiB | 49 | 36 | |
| Readme.md | D | 12-May-2024 | 1.9 KiB | 49 | 36 | |
| build.sh | D | 12-May-2024 | 655 | 17 | 1 | |
| dockerfile | D | 12-May-2024 | 2.5 KiB | 100 | 93 | |
| sources.list | D | 12-May-2024 | 1.5 KiB | 24 | 22 |
Readme-en.md
1## Standalone Docker Environment 2 3This document provides guidance on building the Docker image for standard-system devices. For details about how to build the Docker image for mini- and small-system devices, see [OpenHarmony Docker Image](https://gitee.com/openharmony/docs/blob/master/docker/README_en.md) 4 5The Docker image of OpenHarmony is hosted on [HUAWEI Cloud SWR](https://auth.huaweicloud.com/authui/login.html?service=https%3A%2F%2Fconsole.huaweicloud.com%2Fswr%2F%3Fregion%3Dcn-south-1%26cloud_route_state%3D%2Fapp%2Fwarehouse%2FwarehouseMangeDetail%2Fgoldensir%2Fopenharmony-docker%2Fopenharmony-docker%3Ftype%3DownImage&locale=en-us#/login). Using the Docker image will help simplify environment configurations needed for the building. After configuring the development environments, perform the steps below to access the Docker environment. The following steps use Ubuntu as an example (Windows is also supported). 6 7### Setting Up the Docker Environment for Standard-System Devices (reference memory ≥ 128 MB) 8 9##### **Method 1: Obtaining the Docker image from HuaweiCloud SWR**: 10 111. Obtain the Docker image. 12``` 13docker pull swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker-standard:0.0.5 14``` 152. Go to the root directory of OpenHarmony code and run the following command to access the Docker build environment: 16``` 17docker run -it -v $(pwd):/home/openharmony swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker-standard:0.0.5 18``` 19 20##### **Method 2: Using the Dockerfile to Build a Local Docker Image** 21 221. Obtain the Dockerfile script for a local Docker image. 23``` 24git clone https://gitee.com/openharmony/docs.git 25``` 262. Go to the directory of the Dockerfile code and run the following command to build the Docker image: 27``` 28cd docs/docker/standard 29./build.sh 30``` 313. Go to the root directory of OpenHarmony code and run the following command to access the Docker build environment: 32``` 33docker run -it -v $(pwd):/home/openharmony openharmony-docker-standard:0.0.5 34``` 35 36### Building for Standard-System Devices (reference memory ≥ 128 MB) 37Run the following script to start building for Standard-System Devices (reference memory ≥ 128 MB) 38 39``` 40./build.sh --product-name {product_name} 41``` 42**{product_name}** indicates the platform supported by the current distribution, for example, Hi3516DV300. 43Files generated during compilation are stored in the **out/ohos-arm-release/** directory, and the generated image is stored in the **out/ohos-arm-release/packages/phone/images/** directory. 44 45 46 47**Note** 48 49You can exit Docker by simply running the **exit** command.
Readme.md
1## 独立Docker环境 2 3本文为标准系统类设备Docker使用指导,[点此查看](https://gitee.com/openharmony/docs/blob/master/docker/README.md)小型和轻量系统类设备使用指导。 4 5OpenHarmony的Docker镜像托管在HuaweiCloud SWR上。开发者可以通过该镜像在很大程度上简化编译前的环境配置。开发者在配置好开发环境后,通过以下步骤来使用Docker环境。本Docker支持Ubuntu/Windows平台,下文将以Ubuntu系统为例进行使用介绍。 6 7### 搭建Docker环境-标准系统类设备(参考内存≥128MB) 8 9##### 方式一:从HuaweiCloud SWR上直接获取Docker镜像进行构建: 10 111. 获取Docker镜像。 12``` 13docker pull swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker-standard:0.0.4 14``` 152. 进入OpenHarmony代码根目录执行如下命令,从而进入Docker构建环境。 16``` 17docker run -it -v $(pwd):/home/openharmony swr.cn-south-1.myhuaweicloud.com/openharmony-docker/openharmony-docker-standard:0.0.4 18``` 19 20##### 方式二:通过Dockerfile 构建本地Docker镜像进行构建 21 221. 获取Dockerfile脚本文件,用来构建本地Docker镜像。 23``` 24git clone https://gitee.com/openharmony/docs.git 25``` 262. 进入Dockerfile代码目录路径执行Docker镜像构建命令。 27``` 28cd docs/docker/standard 29./build.sh 30``` 313. 进入OpenHarmony代码根目录执行如下命令,从而进入Docker构建环境。 32``` 33docker run -it -v $(pwd):/home/openharmony openharmony-docker-standard:0.0.4 34``` 35 36### 编译源码-标准系统类设备(参考内存≥128MB) 37通过如下编译脚本启动标准系统类设备(参考内存≥128MB)的编译。 38 39``` 40./build.sh --product-name {product_name} 41``` 42{product_name}为当前版本支持的平台。比如:Hi3516DV300等。 43编译所生成的文件都归档在out/ohos-arm-release/目录下,结果镜像输出在 out/ohos-arm-release/packages/phone/images/ 目录下。 44 45 46 47**说明** 48 49 退出Docker执行exit命令即可。