Deploy an application to an image repository using IntelliJ IDEA

更新时间:
复制 MD 格式

Alibaba Cloud Toolkit lets you quickly deploy applications to an image repository for secure image hosting. After you install and configure Alibaba Cloud Toolkit in IntelliJ IDEA, you can set the deployment parameters in the configuration interface to automate the deployment.

Prerequisites

Configure an image repository

To deploy an application to an image repository using Cloud Toolkit, follow these steps:

  1. Open your project in IntelliJ IDEA.
  2. In the IntelliJ IDEA menu bar, choose Tools > Alibaba Cloud > Deploy to Registry / Kubernetes > Deploy to Registry.
  3. In the Deploy to Registry dialog box, set the deployment parameters.
    deploy to registry

    The following table describes the deployment parameters for an image repository.

    ParameterDescription
    Build Image
    • Context Directory: The directory of the file.
    • Dockerfile: The Dockerfile.
    • Version: The image version number.
    Image Repositories
    Note Context Directory and Dockerfile are based on your local application project.

Deploy an application to ACR

  1. On the deployment parameters page, select Alibaba Cloud Container Registry.
    ACR
  2. Select the Region, Namespace, and Image Repository.
  3. From the Advanced drop-down list, select a network type.
    • Internet: The public network.
    • VPC Network: A virtual private cloud (VPC).
    • Classic Network: The classic network.
  4. Click Apply, and then click Run.

Deploy an application to another image repository

  1. On the deployment parameters page, select Custom Container Registry.
  2. Click Add to configure the registry information.
  3. In the Registry dialog box, set the Name, Address, Username, and Password. Click Apply, and then click OK.
    registry
    Note Click Test Connection to test the connection to the remote repository.
  4. In the Repository dialog box, enter your Registry Address.
  5. Click Apply, and then click Run.

Verify the result

For example, on the Alibaba Cloud Container Registry platform, you can confirm that the image was pushed successfully by checking the update time of your Image Version.

Result verification