More > JRiver Media Center 27 for Linux

Docker Image for MC27

<< < (4/32) > >>

max096:

--- Quote from: HaWi on September 17, 2020, 01:27:01 pm ---I am trying to move to using docker-compose but the noob I am, I have no clue where the docker-compose.yml file should go.
I have created a docker-compose container and mapped a /config directory (/docker/compose/config). Do I put the .yml in there? If so, what if I want to manage different containers with docker-compose?
Sorry about my utter confusion and much gratitude for any help
cheers,
Hans

--- End quote ---

Personally, I have a docker directory in my home directory on the VM I run docker images on for actual use and in there I make folders depending on "use". I put the yml and whatever goes with the container like the config directory inside that folder. When you run docker-compose up without any arguments it searches for a file called exactly docker-compose.yml in the directory you are in currently. Im sure you could also specify what yml it is supposed to use. Personally, I don't really do that.

If you make multiple containers it depends on what those do. If they are independent and have nothing to do with each other you create multiple such yml files. But one cool thing about compose (although I believe largly irrelevant here). It puts every container you define as "service" in the same yml file into the same virtual docker network. And it also creates an alias/dns name inside that network for every service you create. So. Let's assume you created a jriver instance in there and you named it myjrivermc, now if you put a second container/service in there it could connect to jriver using http://myjrivermc:52199 and it will get resolved to the internal ip inside the docker network (this only works if you are in the docker network yourself ofc). Its very useful for wiring up databases with applications and such things without exposing them. I don't know if that matters for now for this image I'm not aware of an companion web-app type application that works with jriver. But if for instance somebody decided to make a better panel webui for jriver and makes a docker container for it that's how you could very easiely wire them up.

In this case, it's just one container and its fine on it's own I suppose. If you wanna change the version you change the version in the yml and you compose down/up the thing and it's done. Or pull if you have it set to latest and wanna check if there is a new latest. etc.

HaWi:
Thanks much Max! This is very cool information. I had erroneously assumed I needed to run a separate docker-compose container, when in reality, the docker package on my Synology understands the docker-compose command all by itself. I put the .yml file into the volume1/docker folder where the MC26 and MC27 folders reside as well. All I needed to do then was ssh in, cd to the docker directory and execute the docker-compose pull command. However, the docker-compose down command didn't work as it didn't remove the old container, but didn't throw an error either. So when I ran docker-compose up -d, I got an error:

ERROR: for jrivermc27  Cannot create container for service jrivermc27: Conflict. The container name "/jrivermc27" is already in use by container "very long HEX number, I think". You have to remove (or rename) that container to be able to reuse that name.
 
Because I was a bit paranoid and didn't want to loose the container that works, I changed the name of the container and ran the up -d again and, voilą, there is the updated MC27.0.12 running in docker. I love it.
Thank you again so much!
cheers,
Hans

sjhilton:
Hi Max - thanks for your work on this. I've managed to get it working on qnap container station as well. I had to switch the display variable from :0 to :1 for some reason, but after doing that it seems to work OK. I assume with new version releases they will just be downloaded on restarting the container rather than having to do a rebuild? I couldn't see anything pop up in the terminal checking the repository. Thanks again.

HaWi:
On the Synology, and I presume on the QNAP as well, there is no automatic update. You'll have to pull a new image, take the current container down and start a new one from the new image as described here (I recommend using docker-compose and a .yml file): https://hub.docker.com/r/shiomax/jrivermc27

Updating the container
docker-compose pull                to pull the latest image as specified in the compose file
docker-compose down             to stop and remove the container (does not mean your data is gone, assuming you have mounted your /config volume)
docker-compose up -d             to create the container and detach from the screen
docker image prune                 to cleanup unused images

If for some reason you can't use docker-compose, all of this can be done manually through the docker GUI (at least on the Synology)

max096:

--- Quote from: sjhilton on September 22, 2020, 06:05:52 am ---Hi Max - thanks for your work on this. I've managed to get it working on qnap container station as well. I had to switch the display variable from :0 to :1 for some reason, but after doing that it seems to work OK. I assume with new version releases they will just be downloaded on restarting the container rather than having to do a rebuild? I couldn't see anything pop up in the terminal checking the repository. Thanks again.

--- End quote ---

The images are automatically rebuilt in gitlab, but the container does not automatically update anything at runtime or when restarting. You need to pull another tag or the latest and use that. Essentially, you delete and recreate the container. Might seem odd if you're not used to docker much.

If you want a GUI that does it for you and qnap can't (don't know about that) you can also try portainer (https://www.portainer.io/). It's essentially a docker container to manager other docker containers with and does have a one button update thing. Under the hood it also pulls the image, deletes the container and creates a new one with the same configuration applied. I've used it when I first learned about docker, but since ditched it.

First time Im hearing that somebody had to change the display for VNC. You have a VNC server running on your host system as well? Running multiple containers of this image on the same system works fine.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version