

- #DOCKER CONTAINER PORT MAPPING HOW TO#
- #DOCKER CONTAINER PORT MAPPING CODE#
- #DOCKER CONTAINER PORT MAPPING WINDOWS#
The Container Instances API and Azure portal include a restartCount property.
#DOCKER CONTAINER PORT MAPPING WINDOWS#
# Deploying a Linux containerĪz container create -g MyResourceGroup -name myapp -image ubuntu -command-line "tail -f /dev/null"Īz container create -g myResourceGroup -name mywindowsapp -os-type Windows -image /windows/servercore:ltsc2019

To resolve this problem, include a start command like the following with your container group deployment to keep the container running. Connecting via EXEC will not work as the container has no process keeping it alive.

When running container groups without long-running processes you may see repeated exits and restarts with images such as Ubuntu or Alpine. If you specify OnFailure and still see continual restarts, there might be an issue with the application or script executed in your container. You may need to change this to OnFailure or Never if you intend to run task-based containers. Container continually exits and restarts (no long-running process)Ĭontainer groups default to a restart policy of Always, so containers in the container group always restart after they run to completion. To increase the availability of your application, run multiple container groups behind an ingress component such as an Application Gateway or Traffic Manager. Second, customers may experience restarts initiated by the ACI infrastructure due to maintenance events. The ACI service recommends applying observability solutions such as Application Insights SDK, container group metrics, and container group logs to determine why the application experienced issues. First, containers may experience restarts caused by an application process crash. There are two broad categories for why a container group may restart without explicit user input. Issues during container group runtime Container had an isolated restart without explicit user input Specify lower CPU and memory settings for the container.Verify your container deployment settings fall within the parameters defined in Region availability for Azure Container Instances.Use one or more of the following mitigation steps to help resolve your issue. This error indicates that due to heavy load in the region in which you are attempting to deploy, the resources specified for your container can't be allocated at that time. Please retry with a different resource request or in another location. The requested resource with 'x' CPU and 'y.z' GB memory is not available in the location 'example region' at this moment. "message": "Back-off pulling image \"/azuredocs/aci-hellowrld\"",ĭue to varying regional resource load in Azure, you might receive the following error when attempting to deploy a container instance:
#DOCKER CONTAINER PORT MAPPING CODE#
"message": "Failed to pull image \"/azuredocs/aci-hellowrld\": rpc error: code 2 desc Error: image t/aci-hellowrld:latest not found", "message": "pulling image \"/azuredocs/aci-hellowrld\"", If the image can't be pulled, events like the following are shown in the output of az container show: "events": [ Ensure that the image exists in the registry, and that you've typed the image name correctly. To resolve this issue, delete the container instance and retry your deployment.

If the image pull operation continues to fail, ACI eventually fails the deployment, and you may see a Failed to pull image error. If Azure Container Instances is initially unable to pull your image, it retries for time. For supported Windows images in Azure Container Instances, see Frequently asked questions. This error is most often encountered when deploying Windows images that are based on Semi-Annual Channel release 1709 or 1803, which are not supported. The error is similar to following, where ' is not supported." If you specify an image that Azure Container Instances doesn't support, an OsVersionNotSupported error is returned. Cannot contain two consecutive hyphens.ġRestriction also for container group names when not specified independently of container instances, for example with az container create command deployments. ScopeĪlphanumeric, and hyphen anywhere except the first or last characterĪlphanumeric, and underscore (_) anywhere except the first or last characterĪlphanumeric, and hyphens anywhere except the first or last character. For more information, see Naming conventions in the Azure Architecture Center and Naming rules and restrictions for Azure resources. Below is a table with specific requirements for container group properties. When defining your container specification, certain parameters require adherence to naming restrictions. Issues during container group deployment Naming conventions If you need more support, see available Help + support options in the Azure portal.
#DOCKER CONTAINER PORT MAPPING HOW TO#
This article shows how to troubleshoot common issues for managing or deploying containers to Azure Container Instances.
