mirror of
https://github.com/ossrs/srs.git
synced 2025-11-24 11:54:21 +08: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:
@@ -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"]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user