Running Odoo behind nginx with docker

I’m running multiple instances of odoo on the same machine using docker, every instance is ran on a different port and binded to
let’s say:

odoo_1 is bound to
odoo_2 is bound to

I want to map each of these instances to a subdomain using nginx. I found this article but it seems like he’s talking about containers that are not bound to hosts (sorry I’m new to docker)

  • Can't connect to MySQL docker container launched via ansible
  • Docker container not able to locate Zip packages?
  • Mounted docker volume to host directory contains only files from the last container
  • Upload saved image to docker
  • Docker mounting volume for editing source code
  • Docker: how to connect two bridges

    To make my need clear, I need a way to generate an nginx config file for every odoo instance running with docker, given the mapping of port -> domain/subdomain.

    Any ideas?

  • Bash / Docker exec: file redirection from inside a container
  • Ansible: no package available for docker-ce
  • How is digest of Docker image calculated?
  • How to convert a VS Code launch.json to a Visual Studio launchSettings.json for .Net Core Web Application
  • Node Docker Image supporting node --harmony
  • Python unable to find sqlalchemy-migrate in Docker image
  • One Solution collect form web for “Running Odoo behind nginx with docker”

    Running Odoo container with Nginx proxy – multi tenant setup, fast and dirty but works well:

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.