Skip to content
This repository has been archived by the owner on Sep 29, 2020. It is now read-only.

Cannot map container ports on ACI #5

Open
chris-crone opened this issue Jun 24, 2020 · 2 comments
Open

Cannot map container ports on ACI #5

chris-crone opened this issue Jun 24, 2020 · 2 comments
Labels
faq Things we know about and need help fixing

Comments

@chris-crone
Copy link
Contributor

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 chris-crone added the faq Things we know about and need help fixing label Jun 24, 2020
@BretFisher
Copy link

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
Copy link
Contributor Author

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
faq Things we know about and need help fixing
Projects
None yet
Development

No branches or pull requests

2 participants