cloud-integration-beta icon indicating copy to clipboard operation
cloud-integration-beta copied to clipboard

Cannot map container ports on ACI

Open chris-crone opened this issue 5 years ago • 2 comments

ACI does not support port mapping so commands like docker run -d -p 8080:80 nginx will fail. You will need to make sure that your docker run commands specify the same container and host ports. e.g.: docker run -d -p 80:80 nginx.

The same applies for services defined in a Compose file.

chris-crone avatar Jun 24 '20 14:06 chris-crone

So does this mean if I have two web apps on port 80 in a compose file, it won't work with docker compose up?

BretFisher avatar Jun 25 '20 18:06 BretFisher

First bit of feedback on this repo, thanks @BretFisher :)

Yes, unfortunately with ACI we can't have two services that use the same port in the Compose stack. This is a combination of two issues:

  1. ACI doesn't support port mapping
  2. We create all the containers in the same container group which is similar to a Kubernetes pod in that all the containers are scheduled on the same host

chris-crone avatar Jun 26 '20 07:06 chris-crone