Updated on 2024-06-12 GMT+08:00

Step 1 Creating a Custom Image

This section shows you how to create an image by loading an image creation template and writing a Dockerfile. Ensure that you have created the development environment and opened a terminal on the Notebook page. For details about Dockerfiles, see Dockerfile reference.

  1. Configure authentication information, specify a profile, and enter the account information as prompted. For more information about authentication, see .

    ma-cli configure --auth PWD -P xxx

  2. Run env|grep -i CURRENT_IMAGE_NAME to query the image used by the current instance.

  1. Create an image.

    1. Obtain the SWR address of the base image.
    1. Load an image creation template.

      Run the ma-cli image get-template command to query the image template.

      Run the ma-cli image add-template command to load the image template to the specified folder. The default path is where the current command is located. For example, load the image creation template.

    2. Modify a Dockerfile.

      After the image template is loaded, the Dockerfile will be automatically loaded in .ma/. The content is as follows and you can modify it based on your needs.

    1. Build an image.

      Run the ma-cli image build command to build an image with the Dockerfile. For more information, see .

      The Dockerfile is stored in and the new image is stored in notebook-test/my_image:0.0.1 in SWR. XXX indicates the profile specified for authentication.