PLUS-POSTECH / soma

Cross-platform CTF problem container manager
Apache License 2.0
24 stars 3 forks source link

Support ephemeral port binding #64

Open Qwaz opened 5 years ago

Qwaz commented 5 years ago

If publish_all_ports option is used, a container will allocate unused ports automatically when it starts.

To handle this scenario,

  1. port becomes optional in run command and ops::run.
  2. HostConfig uses publish_all_ports when external port is not specified.
  3. ops::run returns the port number and image hash. Additional list image command would be needed in ops::run function.
  4. User will see both image hash and port number in CLI.