docker-archive / cloud-integration-beta

Docker CLI with ACI integration (beta)
https://www.docker.com
32 stars 14 forks source link

Cannot map container ports on ACI #5

Open chris-crone opened 4 years ago

chris-crone commented 4 years ago

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.

BretFisher commented 4 years ago

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?

chris-crone commented 4 years ago

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