All Products
Search
Document Center

:(In invitational preview) Create a Windows-based elastic container instance

Last Updated:Feb 07, 2024

Elastic Container Instance supports Windows-based instances. If you want to run containers in a Windows environment, you can use the OsType parameter to specify the Windows OS and create a Windows instance.

Important

Windows-based instances are in invitational preview. To use Windows-based instances, submit a ticket.

Limits

  • When you create a Windows-based elastic container instance, the vCPU and memory specifications of the instance must be not smaller than 2 vCPUs and 4 GiB of memory. The instance cannot be GPU-accelerated instances, instances that have local disks, or ARM-based instances.

  • The version of the Windows container image must be 10.0.20348.*. This means the container image must be a Windows Server 2022 image.

Configuration description

When you call the CreateContainerGroup API operation to create an elastic container instance, you can use the OsType parameter to specify the Windows OS. The following table describes the parameter. For more information, see CreateContainerGroup.

Parameter

Type

Example

Description

OsType

string

Windows

The OS of the elastic container instance. A value of Windows specifies the Windows OS.

Configuration example

ContainerGroupName=test-windows
# Specify the specification of the instance.
InstanceType=ecs.c6.2xlarge
# Specify the OS of the instance.
OsType=Windows
# Create an EIP and associate the EIP with the instance to pull images over the Internet.
AutoCreateEip=true
# Configure the container to use a Windows container image.
Container.1.Name=test
Container.1.Image=mcr.microsoft.com/windows/nanoserver:ltsc2022
Container.1.Command.1=ping
Container.1.Command.2=-t
Container.1.Command.3=localhost