0

My ports in a container app are not being exposed properly.. I get this docker run command docker run -d -p 0:3000 --name ############# -e

Shouldn't the -p command be -p 3000:3000

Lee
  • 63
  • 1
  • 7

1 Answers1

1

Azure Web App for Container is just a kind in Azure Web App. And Azure Web App just expose the port 80(HTTP) and 443(HTTPS) to the Internet. The logs will just show you the command like this:

docker run -d -p 25762:80 --name azurenginx_0 -e WEBSITES_ENABLE_APP_SERVICE_STORAGE=false -e WEBSITE_SITE_NAME=azurenginx -e WEBSITE_AUTH_ENABLED=False -e PORT=80 -e WEBSITE_ROLE_INSTANCE_ID=0 -e WEBSITE_INSTANCE_ID=93ad2e7cf8572308af1ea47b5a6125d6b6778911630249caca8d58ef84d9937b nginx

Or

docker run -d -p 25762:443 --name azurenginx_0 -e WEBSITES_ENABLE_APP_SERVICE_STORAGE=false -e WEBSITE_SITE_NAME=azurenginx -e WEBSITE_AUTH_ENABLED=False -e PORT=80 -e WEBSITE_ROLE_INSTANCE_ID=0 -e WEBSITE_INSTANCE_ID=93ad2e7cf8572308af1ea47b5a6125d6b6778911630249caca8d58ef84d9937b nginx 

If you use the Azure Container Instance, it seems you cannot see the command docker run from the logs. And the result will just like this:

enter image description here

Charles Xu
  • 29,862
  • 2
  • 22
  • 39