datastack-net / dockerized

Run popular commandline tools within docker
MIT License
1.26k stars 39 forks source link

Automatic port forwarding #46

Open boukeversteegh opened 2 years ago

boukeversteegh commented 2 years ago

Description

As a user, I would like to run commands like npm run serve or mkdocs serve without being required to manually map the port to the container.

This way, the commands work more like native commands, and it makes dockerized much more convenient.


Requirements:

  1. The user does not always need to specify -p <PORT> when running dockerized.
  2. Multiple commands can still run in parallel (e.g. npm run serve and npm run lint, using the same npm command).
  3. User is not tied to specific ports, and can use the command as flexibly as the native command.
  4. Should work equally well on each platform (dockerized should not have features that only work on some platforms)

Out of scope:

  1. Commands that open multiple ports should expose all of them.

Possible solutions: