Help Center/ CodeArts Build/ User Guide/ Old User Guide/ Custom Build Environments
Updated on 2024-11-21 GMT+08:00

Custom Build Environments

Background

If the common build environments do not meet your requirements, customize one by adding required dependencies and tools to a base image to make a Dockerfile. Then you can use the custom environment for your build.

Base Images

CodeArts Build uses CentOS 7 and Ubuntu 18 as the base images, which are provided with multiple common environment tools. You can configure custom environments as required.

The built-in environment tools include:

JDK 1.8, Maven, Git, Ant, zip, unzip, GCC, CMake, and Make.

Procedure

  1. Access the CodeArts Build homepage.
  2. In the upper right corner of the CodeArts Build homepage, click More and select Custom Build Environments from the drop-down list.
  3. On the Custom Build Environments page, click a base image to download the Dockerfile template.

  4. Edit the downloaded Dockerfile.

    You can add other dependencies and tools required by the project to customize the Dockerfile. The following figure shows an example of adding JDK and Maven tools.
    RUN yum install -y java-1.8.0-openjdk.x86_64
    RUN yum install -y maven
    RUN echo 'hello world!'
    RUN yum clean all