You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After pulling the ossrs/srs:3 image from Docker, you can directly run the container in the following way. The service can be started normally, even if the -d parameter is added. docker run -p 1935:1935 -p 1985:1985 -p 8080:8080 ossrs/srs:3
However, if you map your own external configuration file, the service will not start properly, even if the external configuration file is the same as the default configuration file in the image. docker run -p 1935:1935 -p 1985:1985 -p 8080:8080 -v /path/of/yours.conf:/usr/local/srs/conf/srs.conf ossrs/srs:3
There is no error message in the logs either. Adding -it to run the container interactively, the mapped configuration file is fine. Manually executing ./objs/srs -c conf/srs.conf can also start the service normally. It seems that the container automatically exits after executing the SRS startup command.
After being reminded by a senior in the DingTalk group, I added the following parameters to my external configuration file to disable the daemon mode: daemon off;
After running the container again, the problem was resolved. I'm recording this for reference for other students who may encounter the same issue!
TRANS_BY_GPT3
The text was updated successfully, but these errors were encountered:
winlinvip
changed the title
Docker部署SRS时映射外部配置文件服务无法启动
When deploying SRS with Docker, the service for mapping external configuration files cannot be started.
Jul 28, 2023
After pulling the ossrs/srs:3 image from Docker, you can directly run the container in the following way. The service can be started normally, even if the -d parameter is added.
docker run -p 1935:1935 -p 1985:1985 -p 8080:8080 ossrs/srs:3
However, if you map your own external configuration file, the service will not start properly, even if the external configuration file is the same as the default configuration file in the image.
docker run -p 1935:1935 -p 1985:1985 -p 8080:8080 -v /path/of/yours.conf:/usr/local/srs/conf/srs.conf ossrs/srs:3
There is no error message in the logs either. Adding
-it
to run the container interactively, the mapped configuration file is fine. Manually executing./objs/srs -c conf/srs.conf
can also start the service normally. It seems that the container automatically exits after executing the SRS startup command.After being reminded by a senior in the DingTalk group, I added the following parameters to my external configuration file to disable the daemon mode:
daemon off;
After running the container again, the problem was resolved. I'm recording this for reference for other students who may encounter the same issue!
TRANS_BY_GPT3
The text was updated successfully, but these errors were encountered: