Ubuntu18.04使用docker安装jitsi-meet

最近一直在研究jitsi-meet,之前在虚拟机本地搭建了一套已经好用了,现在尝试用docker去部署一套,同样也是踩了很多的坑,在网上查阅相关资料发现,大部分都是一样的(* ̄︿ ̄)!!!言归正传,以下是我自己在实际搭建过程当中总结出来的笔记,以虚拟机Ubuntu18.04为基础环境;(阿里云服务器我也尝试用同样的方法搭建过,一直是连不上的状态,可尝试重新构建)

这种情况可以尝试重新创建容器:

docker-compose -f docker-compose.yml -f jigasi.yml up -d --force-recreate

一、安装docker

#更新源到最新
apt-get update
#安装docker
apt-get install docker docker-compose -y
#启动docker
systemctl start docker
#开机启动docker
systemctl enable docker
#查看docker版本
docker version
#编辑文件/etc/docker/daemon.json添加国内镜像地址加速
vim /etc/docker/daemon.json

此时如果找不到daemon.json,应该是正常的,我们可以按照这个路径自己创建一个

sudo tee /etc/docker/daemon.json <<-'EOF'
{
  "registry-mirrors": ["https://9uxjn0e3.mirror.aliyuncs.com"]
}
EOF
sudo systemctl daemon-reload
sudo systemctl restart docker
#修改完地址后重启docker
systemctl restart docker
#查看是否配置成功Registry Mirrors
docker info

二、安装docker-jitsi-meet镜像

#安装git
apt-get install git
#clone仓库代码
git clone https://github.com/jitsi/docker-jitsi-meet && cd docker-jitsi-meet
# 注意:官网是不建议直接拉取Git最新的源码的

#复制配置样例文件并设置环境参数,
cp env.example .env
vim .env
#修改.env配置文件
TZ=Asia/Shanghai
PUBLIC_URL="https://你的域名"

注意:官网是不建议直接git克隆最新的源码,他们提供了压缩包,下载压缩包解压得到工程后,进入工程,从拷贝env.example开始继续下一步操作

 

设置强密码一定不要落下这一步,否则后边容器是启动不了的,好信儿的可以试试,不设置这一步,后边启动容器的时候,看下容器的日志,里边有答案

./gen-passwords.sh
 mkdir -p ~/.jitsi-meet-cfg/{web/letsencrypt,transcripts,prosody/config,prosody/prosody-plugins-custom,jicofo,jvb,jigasi,jibri}

#安装镜像(后面没有点,不知道有些后边带 . 的是怎么成功的,有知道的可以教教我)
docker-compose up -d

此时可以打开浏览器访问:https://IP地址或域名:8443

如果出现不能视频的情况

可以尝试在.env文件中增加:ENABLE_XMPP_WEBSOCKET=0       (随便放哪行都行)

如果出现3人及以上无法加入视频的情况(有可能会出现这种情况),可以尝试修改videobridge容器下的/etc/jitsi/videobridge/sip-communicator.properties文件,增加两行配置:

org.ice4j.ice.harvest.NAT_HARVESTER_LOCAL_ADDRESS=<IP地址(没有https://)>
org.ice4j.ice.harvest.NAT_HARVESTER_PUBLIC_ADDRESS=<没有域名也填IP地址(没有https://)>

这个文件是在视频桥的容器内部的,容器内不知道怎么编辑(有知道的小伙伴可以教教我),我是在容器外部,把这个文件cp出来的,编辑完了之后在cp回到容器内部

# docker cp 容器ID:容器内的路径 容器外的路径
docker cp 94869a2a6a28:/etc/jitsi/videobridge/sip-communicator.properties sip-communicator.properties

vim sip-communicator.properties

# 把文件拷贝回到容器内部
# docker cp 外部的路径 容器ID:容器内的路径
docker cp sip-communicator.properties 94869a2a6a28:/etc/jitsi/videobridge/sip-communicator.properties

这个配置在本地快速搭建时也需要

配置完成后最好重启一下

systemctl restart docker

这里面的几个容器,应该默认都是随docker服务自启动的,所以重启完docker服务之后

# 查看正在运行的容器
docker ps

 到此基于虚拟机Ubuntu18.04,使用docker安装部署jitsi-meet就可以正常访问了,如果需要配置证书的话,可以看看其他的帖子,我就不复制了

### Docker Desktop on Linux Installation and Usage #### Prerequisites for Installing Docker Desktop on Linux To install Docker Desktop, the system must meet certain requirements. The operating system should be a recent version of one of these distributions: Ubuntu (18.04 LTS or later), Fedora (33 or later), Debian (10 or later). Additionally, ensure that virtualization is enabled in BIOS/UEFI settings because it's required by HyperKit which Docker Desktop uses to create VMs[^1]. #### Installation Steps Overview The process involves downloading Docker Desktop from the official website, installing dependencies like HyperKit, and then running an installer package specific to your distribution. For instance, on **Ubuntu**, after ensuring prerequisites are met: ```bash sudo apt-get update && sudo apt-get upgrade -y ``` Install necessary packages including `hyperkit`, `vfio-vsock` kernel module support via APT repository updates as per documentation guidelines provided at Docker’s site. Once all setup scripts complete successfully without errors, launch Docker Desktop through GUI application menus or command line using `com.docker.desktop`. #### Using Docker with Volumes and Containers After successful installation, interacting with containers becomes straightforward. For example, mounting local directories into container environments can be achieved using `-v` flag during runtime commands such as shown below where `${PWD}` represents current working directory path outside container while `/data` specifies internal mount point inside container filesystem structure[^3]: ```bash docker run -d --rm --name qtumd_node1 \ --network=qtum_network \ -v ${PWD}/node1_qtumd.conf:/home/qtum/qtum.conf:ro \ -v ${PWD}/node1_data:/data \ cryptominder/qtum:latest qtumd ``` This command starts a new detached (`-d`) session named `qtumd_node1` within network namespace `qtum_network`. It mounts two volumes read-only configuration file and writable data storage area respectively before executing entrypoint script defined under image tag `cryptominder/qtum:latest`. #### Accessing Running Containers Interacting directly with processes running inside active sessions requires attaching terminal interface linked against target environment. This action utilizes `exec` subcommand alongside specifying shell interpreter type intended for interactive use cases as demonstrated hereunder connecting bash instance attached to previously created service node[^2]: ```bash docker exec -it teamtalk /bin/bash ``` --related questions-- 1. What are common troubleshooting steps when facing issues launching Docker Desktop? 2. How does enabling virtualization improve performance for applications hosted within Docker containers? 3. Can you explain how networks function between host machines and their respective isolated guest instances managed by Docker? 4. In what scenarios would someone prefer utilizing bind mounts over anonymous volumes when configuring persistent storages across multiple services?
评论 8
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值