Giter VIP home page Giter VIP logo

Comments (20)

shugen002 avatar shugen002 commented on June 2, 2024 1

@Genteure 你看下dotnet的构建目标里面是不是有个什么linux-musl-x64之类的可以加。
@b1xcy 我这边试了下,在alpine:latest下,apk add gcompat libstdc++ 后可以运行
image

from bililiverecorder.

Genteure avatar Genteure commented on June 2, 2024

Docker Hub 和 ghcr.io 上提供的镜像文件是用 这个 Dockerfile 打包出来的。另外 这个 Dockerfile 也是可以用的。

你是怎么构建的镜像?
在容器里面运行 ls /app 的输出是什么?

from bililiverecorder.

b1xcy avatar b1xcy commented on June 2, 2024

我的构建方法如下:

FROM rclone/rclone
WORKDIR '/app/brec'
COPY brec.zip /app/brec
RUN unzip brec.zip \
    && chmod 777 * 
WORKDIR '/app'
COPY start.sh /app
RUN chmod +x start.sh
EXPOSE 2356/tcp
ENTRYPOINT ["/bin/ash","./start.sh"]

start.sh的内容是./brec/BililiveRecorder.Cli --version
其中brec.zip为[BililiveRecorder-CLI-linux-x64.zip]
容器里运行ls /app确实会输出brec文件夹
我现在暂时的解决办法是换用ubuntu的底包,在ubuntu中直接运行./BililiveRecorder.Cli可以启动录播机

from bililiverecorder.

Genteure avatar Genteure commented on June 2, 2024

容器里运行 ls / app确实会输出brec文件夹

所以完整的路径是 /app/brec/BililiveRecorder.Cli?
那进入容器运行 /app/BililiveRecorder.Cli 的话提示找不到文件是正常的啊?

from bililiverecorder.

b1xcy avatar b1xcy commented on June 2, 2024

但是我在brec路径下直接运行BililiveRecorder.Cli也是找不到文件,而运行BililiveRecorder.Cli.dll则会出现报错

from bililiverecorder.

Genteure avatar Genteure commented on June 2, 2024

但是我在brec路径下直接运行BililiveRecorder.Cli也是找不到文件

ls /app/brec 输出里有这个文件吗?

其中brec.zip为[BililiveRecorder-CLI-linux-x64.zip]

你在哪个架构运行的?

from bililiverecorder.

b1xcy avatar b1xcy commented on June 2, 2024

docker version输出的结果是OS/Arch: linux/amd64

from bililiverecorder.

Genteure avatar Genteure commented on June 2, 2024

试一下安装 krb5-libs libgcc libintl libssl3 libstdc++ zlib
https://github.com/dotnet/dotnet-docker/blob/f4786b8c0b4469f7eb18f891fd6c090561e50006/src/runtime-deps/6.0/alpine3.17/amd64/Dockerfile#L7-L12C13

或者从 FROM mcr.microsoft.com/dotnet/runtime-deps 构建
https://hub.docker.com/_/microsoft-dotnet-runtime-deps/

from bililiverecorder.

b1xcy avatar b1xcy commented on June 2, 2024

我在构建的时候加入了

RUN apk add --no-cache \
        krb5-libs \
        libgcc \
        libintl \
        libssl3 \
        libstdc++ \
        zlib \
        dotnet6-runtime \
        bash

重新进入容器执行出现以下错误
image

from bililiverecorder.

QmZh avatar QmZh commented on June 2, 2024

安卓手机上模拟Linux终端的termux里直接运行也是提示找不到文件。但是termux里安装ubuntu之后(使用AnLinux应用可以安装),在ubuntu里可以使用,不过时区似乎需要安装一次桌面端(也是使用AnLinux应用)才能自动使用本地时区否则使用的是UTC时间

from bililiverecorder.

Genteure avatar Genteure commented on June 2, 2024

@QmZh 试一下安装 tzdata

from bililiverecorder.

b1xcy avatar b1xcy commented on June 2, 2024

安装tzdata后执行./BililiveRecorder.Cli --version仍然报错

6b3820965da1:/app/brec# ./BililiveRecorder.Cli --version
bash: ./BililiveRecorder.Cli: cannot execute: required file not found

from bililiverecorder.

Genteure avatar Genteure commented on June 2, 2024

@b1xcy 安装 tzdata 是回复上面关于时区的问题

你可以试一下 ldd BililiveRecorder.Cli

实在不行就 FROM 录播姬的镜像构建吧,反过来,把 rclone 加到录播姬的镜像里。

from bililiverecorder.

b1xcy avatar b1xcy commented on June 2, 2024

查看了依赖都在

6b3820965da1:/app/brec# ldd BililiveRecorder.Cli
	/lib64/ld-linux-x86-64.so.2 (0x7f0fe777f000)
	libpthread.so.0 => /lib64/ld-linux-x86-64.so.2 (0x7f0fe777f000)
	libdl.so.2 => /lib64/ld-linux-x86-64.so.2 (0x7f0fe777f000)
	libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x7f0fe750d000)
	libm.so.6 => /lib64/ld-linux-x86-64.so.2 (0x7f0fe777f000)
	libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x7f0fe74ef000)
	libc.so.6 => /lib64/ld-linux-x86-64.so.2 (0x7f0fe777f000)

还是不理解到底缺了什么,只能基于ubuntu构建了

from bililiverecorder.

shugen002 avatar shugen002 commented on June 2, 2024

我在构建的时候加入了

RUN apk add --no-cache \
        krb5-libs \
        libgcc \
        libintl \
        libssl3 \
        libstdc++ \
        zlib \
        dotnet6-runtime \
        bash

我注意到你这里尝试了dotnet-runtime,走这条路的话应该使用不带环境的any包,我试了下,会被提示

You must install or update .NET to run this application.

App: /root/BililiveRecorder.Cli.dll
Architecture: x64
Framework: 'Microsoft.AspNetCore.App', version '6.0.0' (x64)
.NET location: /usr/lib/dotnet/

No frameworks were found.

Learn about framework resolution:
https://aka.ms/dotnet/app-launch-failed

To install missing framework, download:
https://aka.ms/dotnet-core-applaunch?framework=Microsoft.AspNetCore.App&framework_version=6.0.0&arch=x64&rid=alpine.3.17-x64

这里我给出的建议是使用微软的预安装镜像mcr.microsoft.com/dotnet/aspnet:6.0-alpine
一行dotnet ./BililiveRecorder.Cli.dll直接运行

image

from bililiverecorder.

shugen002 avatar shugen002 commented on June 2, 2024

又去测试了一下,用any包,又不想用官方镜像可以apk add aspnetcore6-runtime,启动命令不变dotnet ./BililiveRecorder.Cli.dll

from bililiverecorder.

Genteure avatar Genteure commented on June 2, 2024

确实,是 musl 的原因。不好意思,看这个 issue 的时候潜意识就想着 arm == musl 了,其实不是的。

可以用包管理器安装一下 runtime,然后调用 anycpu 的录播姬文件。

from bililiverecorder.

holwell avatar holwell commented on June 2, 2024

安卓手机上模拟Linux终端的termux里直接运行也是提示找不到文件。但是termux里安装ubuntu之后(使用AnLinux应用可以安装),在ubuntu里可以使用,不过时区似乎需要安装一次桌面端(也是使用AnLinux应用)才能自动使用本地时区否则使用的是UTC时间

您是用的chroot还是proot方式呢

from bililiverecorder.

QmZh avatar QmZh commented on June 2, 2024

安卓手机上模拟Linux终端的termux里直接运行也是提示找不到文件。但是termux里安装ubuntu之后(使用AnLinux应用可以安装),在ubuntu里可以使用,不过时区似乎需要安装一次桌面端(也是使用AnLinux应用)才能自动使用本地时区否则使用的是UTC时间

您是用的chroot还是proot方式呢

您好,我使用的是proot方式。

另外有两件事情可能要注意。一个是解压release文件需要到Ubuntu系统里进行,另一个是我之前在未root手机上曾经出现过录制文件无法移动到/sdcard/Movie或/storage/emulated/0/Movie的情况,后来用root了的手机,没有问题。

手机浏览器如Chrome也可以使用网页UI。唯一不太方便的可能是没有一键录制、取消录制所有房间的选项

from bililiverecorder.

holwell avatar holwell commented on June 2, 2024

from bililiverecorder.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.