go2rtc
go2rtc copied to clipboard
How to Add Configuration Parameters When Starting a Docker Container
How can I add configuration parameters when starting a Docker container, similar to go2rtc -c log.format=text -c rtsp.listen=''? If possible, could you provide the complete docker run command? Looking forward to your reply
This is a general question about docker usage. Not directly related to this project. You need to read the docker documentation.
Here's how I'm doing it in my docker-compose.yml file, in order to avoid a bind mount for the config file, so that I can throw it into docker swarm:
services:
go2rtc:
image: art.t3.daimlertruck.com/godap-docker-virtual/alexxit/go2rtc:latest
privileged: true
environment:
- TZ=America/Los_Angeles
# network_mode: host
ports:
- 1984:1984
- 8554:8554
- 8555:8555
# volumes:
# - "./go2rtc.yaml:/config/go2rtc.yaml"
# Info on constructing the command statement instead of using
# the go2rtc.yaml config file and bind mount can be found here
# https://github.com/AlexxIT/go2rtc/blob/master/internal/app/README.md
command: >
go2rtc
-config api.origin="'*'"
-config streams.bambu_x1e='rtsps://${X1E_USR}:${X1E_ACCESS_CODE}@${X1E_IP_ADDR}/streaming/live/1'
-config log.level='debug'
-config log.format='text'