Unable to Execute a command in a running Azure container instance with REST API

Gallatin 21V 141 Reputation points
2024-04-08T06:44:55.62+00:00

We can enable to execute a command in a running container with az container exec in the Azure CLI : But cannot able to Executes a command in a specific container instance Using REST API

Refer docement: https://docs.azure.cn/en-us/container-instances/container-instances-exec

REST API: https://learn.microsoft.com/en-us/rest/api/container-instances/containers/execute-command?view=rest-container-instances-2023-05-01&tabs=HTTP

We can successfully request the rest api to execute the command and respond 200, but the command is not executed, for example, my test command creates a file, but the command is not executed, there is no file in all the directory, can you help to solve the issue?图像

图像 (1)

Azure Container Instances
Azure Container Instances
An Azure service that provides customers with a serverless container experience.
643 questions
{count} votes