I am very new to using docker. I have been used to using dedicated VM’s and hosting the applications within the servers OS.

When hosting multiple applications/services that require the same port, is it best practice to spin up a whole new docker server or how should I go about the conflicts?

Ie. Hosting multiple web applications that utilize 443.

Thank you!

  • @[email protected]
    link
    fedilink
    English
    91 year ago

    For hosting multiple web apps, what you probably want is a reverse proxy. I recently started using Caddy (specifically Caddy-Docker-Proxy), and I’m liking it. There’s also Traefik, nginx, etc.

    For other types of services, you can simply map whatever (available) port you like in your docker compose file. See here: https://docs.docker.com/compose/networking/