p4lang / p4app

Apache License 2.0
112 stars 58 forks source link

Allow container name to be controlled via P4APP_NAME #51

Closed omeranson closed 6 years ago

omeranson commented 6 years ago

This change adds an optional environment variable P4APP_NAME. If this variable is set, this is the name of the container for run and exec commands.

There are two reasons for this:

  1. This allows running multiple instances of p4app containers, identifying them by name (and environment)

  2. In scripts, having the name of the container known in advanced (or controlled by the parent scripts) helps the script's stability. (Fewer unknowns in the script)