文档说明:只记录关键地方;
试验环境: linux debian 11
目标:启动容器版freeswitch
freeswitch
version: "3"
services:
freeswitch:
image: docker.io/wenba100xie/freeswitch:debian-11-bullseye-v1.10.x-20220227T154307Z
container_name: freeswitch-1
hostname: freeswitch-001
network_mode: host
# restart: on-failure:3
restart: always
cap_add:
- SYS_NICE
command: ['tini','--','/usr/bin/freeswitch','-c']
备注和工具
# 启动freeswitch
# /usr/bin/freeswitch -nonat -nc
# 连接freeswitch
# fs_cli -rRS
# netstat -pln | grep 7443
不使用已经打包的容器快速的安装使用办法(启动一个全新的容器,执行下面的命令即可)
#!/bin/bash
set -exu
__CURRENT__=`pwd`
__DIR__=$(cd "$(dirname "$0")";pwd)
cd ${__DIR__}
test ! -f /etc/apt/source.list.save && cp /etc/apt/sources.list /etc/apt/sources.list.save
sed -i "[email protected]@mirrors.ustc.edu.cn@g" /etc/apt/sources.list && \
sed -i "[email protected]@mirrors.ustc.edu.cn@g" /etc/apt/sources.list &&
apt update -y && apt install -y curl sudo wget ca-certificates libssl-dev file \
gnupg2 net-tools dnsutils iproute2 procps iputils-ping \
apt-transport-https python3 python3-pip \
build-essential lsb-release
echo "127.0.0.1 $HOSTNAME" >> /etc/hosts
# token 这里去申请就好了 https://id.signalwire.com/personal_access_tokens
TOKEN=abcondddfdd
wget --http-user=signalwire --http-password=$TOKEN -O /usr/share/keyrings/signalwire-freeswitch-repo.gpg https://freeswitch.signalwire.com/repo/deb/debian-release/signalwire-freeswitch-repo.gpg
echo "machine freeswitch.signalwire.com login signalwire password $TOKEN" > /etc/apt/auth.conf
echo "deb [signed-by=/usr/share/keyrings/signalwire-freeswitch-repo.gpg] https://freeswitch.signalwire.com/repo/deb/debian-release/ `lsb_release -sc` main" > /etc/apt/sources.list.d/freeswitch.list
echo "deb-src [signed-by=/usr/share/keyrings/signalwire-freeswitch-repo.gpg] https://freeswitch.signalwire.com/repo/deb/debian-release/ `lsb_release -sc` main" >> /etc/apt/sources.list.d/freeswitch.list
apt update -y
apt-get install -y freeswitch-meta-all
参考文档
- hub docker freeswitch
- freeswitch docs
- freeswitch 申请token
- 构建容器版freeswitch
- 一句话启动一个全新 linux 环境
- alpine、debian、ubuntu 常用的换源命令