This topic describes how to create a container group with CentOS images by using the default or minimal settings for some parameters.
You must have activated the Elastic Container Instance (ECI) and Resource Access Management (RAM) services. In addition, you must have assigned an RAM role to the ECI service.Specifically, you must grant the permission to use the container startup command in CMD.
Click here to see how to use the container startup command. Specifically, you need to specify the container startup command in CMD for base images, such as CentOS and BusyBox.
Go to the ECI sales page.
Select the region and zone where you want to deploy the container group. For more information about the supported regions and zones, see Regions and zones.
We recommend that you choose the most recent zones that meet your business requirements, as these have more resources.
After you select a VPC and a VSwitch in the region and zone, the CIDR block and other information about the VPC are displayed on the page. If no VPC or VSwitch is available in the region and zone, create a VPC and a VSwitch in the console.
Click here to see how to create a VPC.
Click here to see how to create a VSwitch.
Select a security group for the VPC. A security group is a virtual firewall that provides state detection and data packet filtering and isolates security zones in the cloud. You can set rules for a security group to allow or disallow access to the public or private network from container groups in the security group as well as access between different container groups.
To allow access to container groups in a VPC from the public network, you need to expose the corresponding service ports in the security group rules. For example, if an NGINX container is deployed in a container group, you need to allow access to port 80 from the public network in the security group rule.
Click here for more information about security groups.
Set names for the container group and the containers in the group. Then, select the image type and version from the image repository.
Select the number of vCPUs and memory size for the container group. The minimum specifications are 0.25 vCPUs and 0.5 GB memory.
To ensure the proper operation of CentOS, you must specify the container startup command in CMD. The simple form of the command is
Click Confirm Configuration. On the page that appears, verify that the configuration is correct, and then click Create ECI to submit the order.
If you do not specify the startup command for the CentOS-based container group and set Restart Policy to Always, the container group keeps attempting to start and stays in the Waiting state.