Closed ahristov314 closed 5 years ago
@ahristov314 The -g is needed for the bind service to stay in the foreground and not shut down. (Otherwise it would require a "messier" setup with something like supervisord)
That said, having the logs go to the STDOUT and STDERR (which is a default when using -g to run bind in the foreground) is actually the recommended approach for docker, rather than directing them from the application itself. The idea is that you will rely on the docker engine to redirect "logging" rather than the application layer.
This is beneficial for three reasons:
See more here: https://docs.docker.com/config/containers/logging/configure/
Currently the -g option prevents any kind of log configuration.