azuredockerazure-devopsdocker-containerazure-container-service

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


I am deploying the image 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://learn.microsoft.com/en-us/learn/modules/run-docker-with-azure-container-instances/2-run-aci. After deployment is successful if I browse it , its showing connection timeout


Solution

  • I don't know how do you deploy the container in Azure. But on my side, it works well and finally, you can see the login page as below:

    enter image description here

    I think the possible reason is that you forget to change the port into 8080 as the image shows. You can the example command:

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

    So the image exposes the port 8080 which you also need to do like it did. Then the CLI command should be:

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