搭建家庭媒体中心

下载最新的Minidlna镜像

docker pull vladgh/minidlna

启动容器

MiniDLNA (Dockerfile)

Image Version Commit License

This is MiniDLNA on top of minimal Alpine. It can be configured with environment variables.
Usage

Prefix any configuration directive of MiniDLNA with MINIDLNA_ and run your container:

1
2
3
4
5
6
docker run -d \
--net=host \
-v <media dir on host>:/media \
-e MINIDLNA_MEDIA_DIR=/media \
-e MINIDLNA_FRIENDLY_NAME=MyMini \
vladgh/minidlna

Note: You need to run the container in host mode for it to be able to receive UPnP broadcast packets. The default bridge mode will not work.
Multiple Media dirs

Any environment variable starting with MINIDLNA_MEDIA_DIR will be treated as an additional media_dir directive and any suffix in the variable name will be trimmed (ex: MINIDLNA_MEDIA_DIR_1). This way you can declare multiple media_dir directives

1
2
3
4
5
6
7
8
docker run -d \
--net=host \
-v <media dir on host>:/media/audio \
-v <media dir on host>:/media/video \
-e MINIDLNA_MEDIA_DIR_1=A,/media/audio \
-e MINIDLNA_MEDIA_DIR_2=V,/media/video \
-e MINIDLNA_FRIENDLY_NAME=MyMini \
vladgh/minidlna

See: http://manpages.ubuntu.com/manpages/raring/man5/minidlna.conf.5.html