How to update docker image - Resilio Sync

Post Reply
svenwegert
Starting out
Posts: 10
Joined: Sun Jun 21, 2015 4:15 pm

Re: How to update docker image - Resilio Sync

Post by svenwegert »

Dear MrTico,

I followed your question and had also no idea how to update a container,
without using "extensively" the CLI (i am not that firm with it ;)) or completely delete and reconfigure via QNAP Container Station.

I could REALLY REALLY REALLY (did i already said REALLY?) recommend you, to use "Portainer" for this!
Portainer brings you a complete new understanding of handling containers with docker!!!(!!!!!!!!!)

Portainer is a WEB-GUI for docker. You are able to edit every container with ease, can double it for testing purpose, add or remove folder-shares/-mounts or whatever you want.
And this, without remembering all your configurations and deletion and re-configuration like you have to do with QNAP
(If you are not that familiar with CLI or docker-cli like me).

Start here with docker for your QNAP:
https://qnapclub.eu/en/qpkg/466

and here to tell portainer to use the lokal installed docker-engine "from qnap":
viewtopic.php?f=320&t=133975&start=15#p646136

here are my scrots from evernote how it should looks like
Image
Image
Image

Another tipp for "backup" (and editing!) your prefs/containers is "runlike".
With runlike you are able to output all taken configs of each single container and if something crashes,
you have your 1:1 "one-liner" for CLI to reinstall your container.

how to use in QNAP-CLI:

Code: Select all

docker run -v /var/run/docker.sock:/var/run/docker.sock assaflavie/runlike -p motioneye
# while motioneye is a container you want the output for
output:

Code: Select all

docker run \
	--name=motioneye \
	--env="TIMEZONE=Europe/Berlin" \
	--env="PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" \
	--env="MOTIONEYE_VERSION=0.36.1" \
	--volume="/share/Container/motioneye/media:/home/nobody/media:rw" \
	--volume="/share/Container/motioneye/config:/config:rw" \
	-p 0.0.0.0:8082:8081/tcp \
	-p 0.0.0.0:8766:8765/tcp \
	--detach=true \
	-t \
	jshridha/motioneye:latest \
	/sbin/my_init
and with this config, you are able to get it to run again, if you change the docker-machine, reset your QNAP or just for doing some rudimentary backup stuff ;)

If you have any question about this, feel free to ask ;)

kind regards and,
hopefully having a lot of fun in a completely "new world" of docker

Sven
User avatar
olivers
Starting out
Posts: 18
Joined: Thu Feb 20, 2014 11:10 pm

Re: How to update docker image - Resilio Sync

Post by olivers »

After investigations today, I have sucessfully installed Watchtower to auto update my containers in Container Station.

You need to ssh into your qnap and run (i.e. daily at 4 o'clock UTC):
docker run -d -v /var/run/docker.sock:/var/run/docker.sock --restart unless-stopped --name watchtower v2tec/watchtower --cleanup --schedule "0 0 4 * * *"
TS-563, 5x Seagate ST4000VN008-2DR166
Post Reply

Return to “Container Station”