This is not Docker related.
If an application spawns a sub-process, that sub-process will inherit all environment variables. Which might be fine or might not be, e.g. if the spawned application is user controlled.
Also tools such as Airbrake or Sentry often send all your ENV variables to the error collection server, effectively exposing your secret values. Most such tools offer to filter variables, but that's in my experience almost always not done pro-actively.
The only thing that's Docker related in that post is that it does offer a turn-key solution for Docker-based projects.
The solution's principle can be applied to other projects though, i.e. secrets should be read from a config file (or something like Vault).