安装请参考官方教程。以下为更新脚本bilirec-update.sh
:
#!/bin/bash
if (( $EUID != 0 )); then
echo "$0: root permission is required"
exit
fi
# 镜像地址
image="bililive/recorder"
tag="latest"
# 容器名
container_name="ghcr.io/bililiverecorder/bililiverecorder"
# 工作目录
rec_path="/path/to/recording"
# 端口
port="2356"
# 用户名 密码
username="username"
password="password"
echo ":: Pulling $image:$tag ..."
docker pull $image:$tag
echo ":: Removing old container ..."
docker stop $container_name
docker rm $container_name
echo ":: Creating new container ..."
docker run -d \
--name $container_name \
--restart unless-stopped \
-p $port:2356 \
-v $rec_path:/rec \
-e BREC_HTTP_BASIC_USER=$username \
-e BREC_HTTP_BASIC_PASS=$password \
$image:$tag
echo ":: done!"
Comments NOTHING