8000 GitHub - ossrs/dev-docker: The docker for development environment for SRS.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

ossrs/dev-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

67 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

srs-docker

CentOS docker for SRS developer.

Usage

>>> Install docker

Download docker from here then start docker.

>>> Clone SRS

cd ~/git &&
git clone https://gitee.com/ossrs/srs.git srs && cd srs/trunk && 
git remote set-url origin https://github.com/ossrs/srs.git && git pull

Note: Please read https://github.com/ossrs/srs#usage

>>> Build SRS in dev docker

cd ~/git/srs/trunk &&
docker run -it --rm -v `pwd`:/srs -w /srs ossrs/srs:ubuntu20 \
    bash -c "./configure && make"

After build, the binary file ./objs/srs is generated.

Remark: Recomment to use registry.cn-hangzhou.aliyuncs.com/ossrs/srs:ubuntu20 to speed-up.

Run SRS in dev docker

cd ~/git/srs/trunk &&
docker run -p 1935:1935 -p 1985:1985 -p 8080:8080 -p 8085:8085 \
     -it --rm -v `pwd`:/srs -w /srs ossrs/srs:ubuntu20 \
    ./objs/srs -c conf/console.conf

# Or for macOS, with WebRTC.
docker run -p 1935:1935 -p 1985:1985 -p 8080:8080 -p 8085:8085 \
    --env CANDIDATE=$(ifconfig en0 inet| grep 'inet '|awk '{print $2}') -p 8000:8000/udp \
     -it --rm -v `pwd`:/srs -w /srs ossrs/srs:ubuntu20 \
    ./objs/srs -c conf/console.conf

Debug SRS by GDB in dev docker

cd ~/git/srs/trunk &&
docker run -p 1935:1935 -p 1985:1985 -p 8080:8080 -p 8085:8085 \
     --privileged -it --rm -v `pwd`:/srs -w /srs ossrs/srs:ubuntu20 \
    gdb --args ./objs/srs -c conf/console.conf

GDB

To run docker with --privileged for GDB, or it fail for error Cannot create process: Operation not permitted.

Winlin, 2021.03

About

The docker for development environment for SRS.

Resources

Stars

Watchers

Forks

Contributors 3

  •  
  •  
  •  
0