本帖最后由 clion007 于 2024-4-26 18:41 编辑
折腾缘由:
这两年开始折腾Nas和使用docker,在自己的All in one上,搭建了Jellyfin媒体服务器,手机和电视配合相关的APP使用还是蛮不错的。不过使用的过程中发现,官方的镜像和另一个常用的linuxserver维护的镜像都有一些问题,比如中文乱码,硬件加速驱动问题等,网上有个大神做了个中国特别版的,我看拉下来看了一下,体积特别的大,白白占用很大的磁盘空间,实在没有必要。于是,这两天花了点时间,参考nyanmisaka和linuxserver的镜像,自己做了一个基于alpine(最新版v3.19基础镜像只有7M)的Jellyfin docker镜像,并放到了阿里云的docker公开仓库上。
镜像特点:
- 镜像体积比起能在网上找到的主流镜像都小得多,阿里云仓库国内拉取镜像也快;
- 自带硬件解码加速驱动,开箱即用,只做了支持X86的,不支持其它平台;
- 添加相关中文字体库,解决了栏目封面和字幕中文乱码的问题;
- 默认以jellyfin用户运行容器jellyfin进程,非root运行,更加安全;
- 支持配置文件本地化保存,避免重新运行容器时配置丢失;
- 没有其它任何多余的东西,所有软件版本都更新到最新版本。
相关构建的源代码放到了github上面,并用gitaction自动构建推送,感兴趣的可以自己去看,项目地址:https://github.com/clion007/docker-jellyfin。
下面有关于本镜像相关的详细介绍,放出来分享给有需要的坛友,有喜欢的自取就好,详细的使用方法和拉取存储库可见docker cli部分,如果是在unraid上部署,可以直接用linuxserver的模板,改一下存储库为我的存储库就好。
Github项目上的说明介绍:
Jellyfin is a Free Software Media System that puts you in control of managing and streaming your media. It is an alternative to the proprietary Emby and Plex, to provide media from a dedicated server to end-user devices via multiple apps. Jellyfin is descended from Emby's 3.5.2 release and ported to the .NET Core framework to enable full cross-platform support. There are no strings attached, no premium licenses or features, and no hidden agendas: just a team who want to build something better and work together to achieve it.
This clion/jellyfin docker image supply you a better choice for the jellyfin container than offical image. It is builded base on latest alpine, with smaller size and fix the ffmpg decode, hardware drivers and chinese shown in garbled problems et,al.
Application Setup
- Webui can be found at http://:8096
- More information can be found on the official documentation.
Hardware Acceleration
Many desktop applications need access to a GPU to function properly and even some Desktop Environments have compositor effects that will not function without a GPU. However this is not a hard requirement and all base images will function without a video device mounted into the container. For Intel/ATI/AMD to leverage hardware acceleration you will need to mount /dev/dri video device inside of the container. - --device=/dev/dri:/dev/dri
复制代码I will automatically ensure the jellyfin user inside of the container has the proper permissions to access this device.
Usage
To help you get started creating a container from this image you can either use docker-compose or the docker cli.
Image pull
- docker pull registry.cn-chengdu.aliyuncs.com/clion/jellyfin
复制代码
Parameters
Containers are configured using parameters passed at runtime (such as those above). These parameters are separated by a colon and indicate : respectively. For example, -p 8080:80 would expose port 80 from inside the container to be accessible from the host's IP on port 8080 outside the container.
- -p 8096 Http webUI.
- -p 8920 Optional - Https webUI (you need to set up your own certificate).
- -p 7359/udp Optional - Allows clients to discover Jellyfin on the local network.
- -p 1900/udp Optional - Service discovery used by DNLA and clients.
- -e PUID=1000 for UserID - see below for explanation.
- -e PUID=1000 for GroupID - see below for explanation.
- -e TZ=Asia/Shanghai specify a timezone to use in your local area.
- -e JELLYFIN_PublishedServerUrl=192.168.0.5 Set the autodiscovery response domain or IP address.
- -v /config Jellyfin data storage location. This can grow very large, 50gb+ is likely for a large collection.
- -v /video Media goes here. Add as many as needed e.g. /video/movies, /video/tv, etc.
Umask for running applications
For all of my images I provide the ability to override the default umask settings for services started within the containers using the optional -e UMASK=022 setting. Keep in mind umask is not chmod it subtracts from permissions based on it's value it does not add. |