Open ports to Docker containers

I'm starting with docker, just triying to run a Docker container with a web aplication and trying to see it in our local network.

I have installed a fresh Ubuntu 14 LTS in VirtualBox, without any extra services (no GUI, no LAMP, no OpenSSH...), and then installed only Docker:

curl -sSL | sh

and I have run an Odoo (OpenERP) container (previusly run postgree container)

docker run -d -e POSTGRES_USER=odoo -e POSTGRES_PASSWORD=odoo --name db postgres
docker run -p --name odoo --link db:db -t odoo

Very simple. It looks like it is working. I have not installed browser, but I connected via telnet to and sent GET request. It answered.

Now I need to access the service from outside. How?

  • VirtualBox network interface is configured as bridge.

  • I have set a fixed IP ( in Ubuntu eth0 interface.

  • UFW is disabled

  • I can ping to form other computers, and ubuntu answers.

  • But browser doesnt detect anything at

  • Can't connect via telnet to

I suppose it must be some configuration of port redirection or interface mapping. Could you help me, please? :)

Finally I found the answer. Problem was the port assignement. If you set:


you are exposing ONLY localhost. This is great security option if you need only a local service, and want to access it only from the server. But, if you want to expose the port to ALL interfaces, just type:

-p 8069:8069

Then, you can access the service through the network via eth0 interface :)