-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Description
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