Custom Build Environments
Background
If the common build environments cannot meet your requirements, customize an environment. To do this, add dependencies and tools required by the project to the base image of the custom environment, build the image into a Docker image and push it to SWR for public use. Then you can use the public image through SWR.
Base Image
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
- Log in to the CodeArts Build homepage.
- In the upper right corner of CodeArts Build homepage, click More and choose Custom Build Environments from the drop-down list.
- On the Custom Build Environments page, click a base image to download the Dockerfile template.
- Edit the downloaded Dockerfile.
You can add other dependencies and tools required by the project as required 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
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.