More > JRiver Media Center 27 for Linux
Docker Image for MC27
max096:
--- Quote from: lwlmc on February 09, 2021, 01:28:43 am ---Hi Max, Thanks for making this Docker container. I am running it on my Unraid server and it is very easy and convenient.
My music library includes Japanese music and the container by default displays Japanese characters as a bunch of rectangles. The base image you used for the container has a ENABLE_CJK_FONT env variable that I am setting so it installs the font needed for the Japanese text to display properly in MC. However, when that script runs it fails to install the font package. Here's a snippet of the log:
--- Code: ---[cont-init.d] 10-cjk-font.sh: executing...
[cont-init.d] 10-cjk-font.sh: installing CJK font...
[cont-init.d] 10-cjk-font.sh: Get:1 http://security.debian.org/debian-security buster/updates InRelease [65.4 kB]
[cont-init.d] 10-cjk-font.sh: Get:2 http://deb.debian.org/debian buster InRelease [122 kB]
[cont-init.d] 10-cjk-font.sh: Get:3 http://deb.debian.org/debian buster-updates InRelease [51.9 kB]
[cont-init.d] 10-cjk-font.sh: Get:4 http://security.debian.org/debian-security buster/updates/main amd64 Packages [267 kB]
[cont-init.d] 10-cjk-font.sh: Get:5 http://deb.debian.org/debian buster/main amd64 Packages [7907 kB]
[cont-init.d] 10-cjk-font.sh: Get:6 http://deb.nodesource.com/node_12.x buster InRelease [4584 B]
[cont-init.d] 10-cjk-font.sh: Get:7 http://dist.jriver.com/latest/mediacenter buster InRelease [3612 B]
[cont-init.d] 10-cjk-font.sh: Get:8 http://deb.nodesource.com/node_12.x buster/main amd64 Packages [767 B]
[cont-init.d] 10-cjk-font.sh: Get:9 http://dist.jriver.com/latest/mediacenter buster/main i386 Packages [706 B]
[cont-init.d] 10-cjk-font.sh: Get:10 http://dist.jriver.com/latest/mediacenter buster/main arm64 Packages [642 B]
[cont-init.d] 10-cjk-font.sh: Get:11 http://dist.jriver.com/latest/mediacenter buster/main amd64 Packages [678 B]
[cont-init.d] 10-cjk-font.sh: Get:12 http://dist.jriver.com/latest/mediacenter buster/main armhf Packages [685 B]
[cont-init.d] 10-cjk-font.sh: Get:13 http://deb.debian.org/debian buster-updates/main amd64 Packages [9504 B]
[cont-init.d] 10-cjk-font.sh: Fetched 8434 kB in 3s (2794 kB/s)
[cont-init.d] 10-cjk-font.sh: Reading package lists...
[cont-init.d] 10-cjk-font.sh: Reading package lists...
[cont-init.d] 10-cjk-font.sh: Building dependency tree...
[cont-init.d] 10-cjk-font.sh: Reading state information...
[cont-init.d] 10-cjk-font.sh: The following NEW packages will be installed:
[cont-init.d] 10-cjk-font.sh: fonts-wqy-zenhei
[cont-init.d] 10-cjk-font.sh: 0 upgraded, 1 newly installed, 0 to remove and 37 not upgraded.
[cont-init.d] 10-cjk-font.sh: Need to get 7472 kB of archives.
[cont-init.d] 10-cjk-font.sh: After this operation, 16.8 MB of additional disk space will be used.
[cont-init.d] 10-cjk-font.sh: Get:1 http://deb.debian.org/debian buster/main amd64 fonts-wqy-zenhei all 0.9.45-7 [7472 kB]
[cont-init.d] 10-cjk-font.sh: debconf: delaying package configuration, since apt-utils is not installed
[cont-init.d] 10-cjk-font.sh: Fetched 7472 kB in 22s (337 kB/s)
[cont-init.d] 10-cjk-font.sh: dpkg: unrecoverable fatal error, aborting:
[cont-init.d] 10-cjk-font.sh: unknown system group 'messagebus' in statoverride file; the system group got removed
[cont-init.d] 10-cjk-font.sh: before the override, which is most probably a packaging bug, to recover you
[cont-init.d] 10-cjk-font.sh: can remove the override manually with dpkg-statoverride
[cont-init.d] 10-cjk-font.sh: E: Sub-process /usr/bin/dpkg returned an error code (2)
[cont-init.d] 10-cjk-font.sh: exited 0.
--- End code ---
What I found is the 'messagebus' group is not present on the system and dpkg always fails unless the following fix is run (from https://askubuntu.com/questions/335538/unknown-user-in-statoverride-file):
--- Code: ---sudo sed -i '/messagebus/d' /var/lib/dpkg/statoverride
--- End code ---
Afterwards 'add-pkg' works again and I can manually open a Bash shell inside the container and manually install the font package I need. (Or I can manually run that 10-cjk-font.sh). Problem is, every time I update the container (which involves container deletion and re-creation) I need to redo the fix to the statoverride file and reinstall the fonts.
Is it possible to add an environment variable to the container so we can install additional packages each time the container runs (after also fixing up the statoverride file)?
Thank you.
--- End quote ---
Iīll see what I can do about the cjk-font.
As far as installing custom packages on your own I think it would be easiest to make an environment variable where you can set a path to a script. Then you could write some script with whatever you want to do on startup. Be it installing packages or anything else really.
max096:
As a temporary quick fix you can create a file '10-cjk-font.sh'
--- Code: ---#!/usr/bin/with-contenv sh
set -e # Exit immediately if a command exits with a non-zero status.
set -u # Treat unset variables as an error.
log() {
echo "[cont-init.d] $(basename $0): $*"
}
if [ "${ENABLE_CJK_FONT:-0}" -eq 1 ]; then
if fc-list | grep -q "WenQuanYi Zen Hei"; then
log "CJK font already installed."
else
log "installing CJK font..."
if [ -n "$(which apk)" ]; then
add-pkg wqy-zenhei --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing 2>&1 | sed "s/^/[cont-init.d] $(basename $0): /"
else
sed -i /messagebus/d /var/lib/dpkg/statoverride
add-pkg fonts-wqy-zenhei 2>&1 | sed "s/^/[cont-init.d] $(basename $0): /"
fi
fi
fi
# vim: set ft=sh :
--- End code ---
Itīs this file https://raw.githubusercontent.com/jlesage/docker-baseimage-gui/master/rootfs/etc/cont-init.d/10-cjk-font.sh the only difference being the added 'sed -i /messagebus/d /var/lib/dpkg/statoverride'.
Then you can mount this to /etc/cont-init.d to overwride it inside the container.
--- Code: ---volumes:
- /path/to/file/10-cjk-font.sh:/etc/cont-init.d/10-cjk-font.sh
--- End code ---
Then it should work again. I wonīt be adding this into the image and instead make an issue on the baseimage or a pull request to get the change in. Just gonna take a bit longer.
This is also a good way you can inject custom scripts into the container that does not actually need any change. Didnīt think of it at first. All of the scripts in /etc/cont-init.d are executed on startup ordererd by the proceeding number. So if you where to mount 100_myscript.sh into there it would execute at the very end.
NH:
--- Quote from: max096 on September 09, 2020, 04:46:51 pm ---I' ve updated my Docker image to now also build images for MediaCenter 27.
--- End quote ---
Dear Max
Is there a step by step guide using the QNAP GUI that I can use. I dont know how to use Linux commands to do this.
I managed to create the container but am unable to use VNC to get inside JRiver to configure. I get to the panel screen on port 52199 but without being able to configure import files or other settings.
And I am not able to log in via VNC server. Tried several times - get the message _connection closed unexpectedly". So not able to do anything.
I am obviously missing a trick because others seem to be able to use it.
Enclosed a sample from another software http://www.jthink.net/songkong/install_docker_qnap.jsp which even a Linux ignoramus like was able to install. I straightaway landed on the GUI of the app. Will be great to have instructions like this.
Appreciate any help you can provide. Many thanks.
Best
NH
max096:
--- Quote from: NH on February 28, 2021, 04:25:25 am ---Dear Max
Is there a step by step guide using the QNAP GUI that I can use. I dont know how to use Linux commands to do this.
I managed to create the container but am unable to use VNC to get inside JRiver to configure. I get to the panel screen on port 52199 but without being able to configure import files or other settings.
And I am not able to log in via VNC server. Tried several times - get the message _connection closed unexpectedly". So not able to do anything.
I am obviously missing a trick because others seem to be able to use it.
Enclosed a sample from another software http://www.jthink.net/songkong/install_docker_qnap.jsp which even a Linux ignoramus like was able to install. I straightaway landed on the GUI of the app. Will be great to have instructions like this.
Appreciate any help you can provide. Many thanks.
Best
NH
--- End quote ---
There isnīt really a guide specifically for that. But since you are getting to the panel webui probably you can just instead of :52199 head to :5800 and if you allowed that port too you should get to the noVNC webgui where you can interact with jriver just as you would on a desktop.
I can help you explain things and hopefully we can figure it out. Not currently planning to make a guide specifically for the qnap gui though.
max096:
--- Quote from: max096 on February 21, 2021, 10:54:20 am ---I wonīt be adding this into the image and instead make an issue on the baseimage or a pull request to get the change in. Just gonna take a bit longer.
--- End quote ---
Guess I lied about that. Itīs been a week the guy that maintains the baseimage didnīt write back. Im sure he will eventually. But since itīs just a little change I just put it in as is and overwrote the file. Give it half an hour to spit out all the images and the ENABLE_CJK_FONT option should work again without doing anything special.
Also updated the readme with a guide for running custom initialization scripts. Itīs fine for experimenting and quick fixing stuff (installing additional packages or whatever you want to do). But if you are making changes that fix things that could benefit other users of the image. It would be better if you can make me aware of it (here or gitlab issue), or make a merge request on gitlab.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version