mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Refine docker detect mechenism. v5.0.190 v6.0.90 (#3758)
When using Docker, logs are usually printed to console (stdout and stderr). However, since Docker detection occurs late, after log initialization, the default log output may be incorrect. In Docker, logs may still be written to a file instead of the console as expected. Additionally, the Dockerfile has been improved with a new environment variable `SRS_IN_DOCKER=on` to clearly indicate a Docker environment. If automatic Docker detection fails, the configuration will be read, and this variable will correctly inform SRS that it's in a Docker environment. Lastly, the default configuration values have been improved for Docker environments. By default, `SRS_LOG_TANK=console` and daemon mode is disabled. --------- Co-authored-by: john <hondaxiao@tencent.com>
This commit is contained in:
parent
c91e3a36c2
commit
a458c9c68d
6 changed files with 54 additions and 51 deletions
|
@ -56,6 +56,6 @@ RUN ldd /usr/local/srs/objs/ffmpeg/bin/ffmpeg && \
|
|||
|
||||
# Default workdir and command.
|
||||
WORKDIR /usr/local/srs
|
||||
ENV SRS_DAEMON=off
|
||||
ENV SRS_DAEMON=off SRS_IN_DOCKER=on
|
||||
CMD ["./objs/srs", "-c", "conf/docker.conf"]
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue