运行 容器 运行 之后 azure 容器实例中的命令

Running commands in azure container instance after container running

我正在使用代码服务器容器 运行ning 我正在 运行ning az container exec --resource-group resourcename --name code-server --exec-command "ls" 它提供了文件和文件夹列表但是如果我们 运行 az container exec --resource-group resourcename --name code-server --exec-command "cd folder" 不工作显示 rpc error: code = 2 desc = oci runtime error: exec failed: container_linux.go:247: starting container process caused "exec: \"cd Angular\": executable file not found in $PATH"

之类的错误

当您想在容器实例中执行命令时,这是一个常见问题。此功能在 Azure 容器实例上并非绝对支持。它只支持单个命令,它显示 here:

Azure Container Instances currently supports launching a single process with az container exec, and you cannot pass command arguments. For example, you cannot chain commands like in sh -c "echo FOO && echo BAR", or execute echo FOO.