1

I am using httpbin image (dockerhub: kennethreitz/httpbin) which exposes TCP 80 port. Using pulumi on azure, I am able to expose port 80 outside (which matches the image), but how to expose a different port like 8080?

In other words, equivalent of -p 80:80 is working, but how to do something equivalent to:
docker run -p 8080:80 kennethreitz/httpbin

I am using azure-native with typescript, but example in any other language would be fine too. If I try a different port under ipAddress property, it results in this error: Following ports '8080' in the 'ipAddress' are not used by any container in container group 'somecontgrpa44e2ac5'.

Thanks.

S2L
  • 1,746
  • 1
  • 16
  • 20
  • 1
    It sounds like you can't - based on https://github.com/MicrosoftDocs/azure-docs/issues/69786 and https://stackoverflow.com/questions/52491074/azure-container-instances-expose-port-to-bind-on-443-https and https://stackoverflow.com/questions/55550966/mapping-ports-with-azure-docker-containers – Mikhail Shilkov Dec 22 '21 at 09:01
  • 1
    Thanks @MikhailShilkov. Can you help me understand how container groups are useful, if two containers within it listen on same port? – S2L Dec 22 '21 at 17:07

0 Answers0