Closed sumocomputers closed 3 years ago
@sumocomputers
To get the version from inside of the container, you can run /locast2tuner -V
roddie@plex ~/docker% docker exec -it locast2tuner /bin/sh
/ # /locast2tuner -V
locast2tuner 0.1.40
Or do it all in one command:
roddie@plex ~/docker% docker exec -it locast2tuner /locast2tuner -V
locast2tuner 0.1.40
To update a Docker container is a little bit annoying, but basically you're going to do this:
Pull the latest version of the locast2tuner container image:
docker pull ghcr.io/wouterdebie/locast2tuner:latest
Stop the existing container:
docker stop locast2tuner
Remove the existing container:
docker rm locast2tuner
Then issue the docker run command that you started with originally.
The better way is to run this from docker-compose - (there's a sample in the repo and I have a blog post about it).
Then you just have to do two commands.
Update all container images:
docker-compose pull
Restart all containers with new versions:
docker-compose up -d
Thanks for this great info.
I will check out your post on docker-compose, since that seems to be a much better method.
@eiddor FYI - read the article on docker-compose and now successfully using it to run locast2tuner with all my config options too. Very cool, so thanks for the great help!
@sumocomputers I got bored and figured I'd help you get started with docker-compose. Based on your docker run
command from #51
docker run -p 6078:6077 -v ~/Downloads/Locast2Tuner/.locast2tuner/:/app/config --name locast2tuner -d ghcr.io/wouterdebie/locast2tuner:latest
Here's what your docker-compose.yml
file should look like:
version: '3'
services:
locast2tuner:
image: ghcr.io/wouterdebie/locast2tuner:latest
container_name: locast2tuner
volumes:
- ~/Downloads/Locast2Tuner/.locast2tuner/:/app/config
ports:
- 6078:6077
restart: unless-stopped
Hahaha man we posted those at the same time - I'm glad you got it going!
Now you'll make the docker-compose pull
and docker-compose up -d
as part of your routine :-)
The only thing I changed was:
restart: always
And I already used the 2 commands to update to 0.1.41 and it worked awesome!
That's great!
So, the only reason I use unless-stopped
instead of always
is because I might want to test with a different version (in a different docker-compose.yml
file), without conflicts between reboots or sometimes I don't want a container to run for a while (ie. one that connects to my NAS).
Maybe we should have section in the README
about updating?
Yep! I will work on something when I get home later this week.
@eiddor sweet! Thanks!
I am trying to understand the best way to know the version of locast2tuner running in Docker on Mac.
I have gone into the Docker Container command prompt, which dumps me to /bin/sh, but when running
locast2tuner -h
for example, it just sayslocast2tuner not found
Also, what is the best way to update to the latest version of locast2tuner for Docker? I just wasn't sure if stopping and starting the Container will do the trick, since I don't know how to check the version :-)