brooklyncentral / clocker

Apache Brooklyn cloud native infrastructure blueprints
Apache License 2.0
426 stars 66 forks source link

Default mapped ports should be exposed via mapped.docker.port.XX sensor #282

Open johnmccabe opened 8 years ago

johnmccabe commented 8 years ago

Adding a VanillaDockerApplication results in any container specified ports being mapped by docker.

It would be useful if these could be exposed in mapped.docker.port.XX sensors without explicitly specifying an openPorts entry.

For example:

location: dc
services:
- type: docker:mariadb:5.5
  id: db
  env:
    MYSQL_ROOT_PASSWORD: "heloooooo"

Can be seen exposing the following:

CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
f92fa009247f 4898c21213910b7c92f584e44f5f23a02317fa4fd0e0eb3977d5a89a9210e52a "/docker-entrypoint.s" 5 minutes ago Up 5 minutes 0.0.0.0:32795->22/tcp, 0.0.0.0:32794->3306/tcp db_gwgebmsg