This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
version: '3.8' # 使用docker-compose的版本3.8,您可以根据需要使用其他版本
services:
srs:
image: registry.cn-hangzhou.aliyuncs.com/ossrs/srs:5 # 使用的镜像
container_name: srs # 容器名称,可选
restart: unless-stopped # 如果不是手动停止,则总是重启容器
ports:
- "1935:1935" # 映射1935端口
- "1985:1985" # 映射1985端口
- "8081:8080" # 映射8080端口到宿主机的8081端口
tty: true # 分配一个伪tty,相当于docker run的-t选项
stdin_open: true # 保持stdin开放,相当于docker run的-i选项