在 Azure 中部署 docker 个容器之后。如果我浏览 url 它会给我连接超时

After deploying docker container in Azure. If I browse the url its giving me connection timeout

我正在部署映像 https://hub.docker.com/r/codercom/code-server which is remote VS code.I have deployed this in Azure as steps mentioned in the link https://docs.microsoft.com/en-us/learn/modules/run-docker-with-azure-container-instances/2-run-aci。部署成功后浏览显示连接超时

我不知道你如何在 Azure 中部署容器。但在我这边,它运行良好,最后,您可以看到如下登录页面:

我觉得可能是你忘记把端口改成如图所示的8080了。您可以使用示例命令:

docker run -it -p 127.0.0.1:8080:8080 -v "$PWD:/home/coder/project" codercom/code-server

因此图像公开了端口 8080,您也需要像这样做一样。那么 CLI 命令应该是:

az container create -g your_group -n aci_name --image codercom/code-server --ip-address Public --ports 8080