Guest Join UsHey Guest,
Welcome, Join our awesome community where you can discuss on various topics :-
Some point about your community
Some point about your community
Some point about your community
Some point about your community
Some point about your community
Some point about your community
Some point about your community
Much More.. or Create an Account


I am super Awesome Announcement, with links and can be used to announce important things. Check here
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Updating Docker containers on Synology?
#11
You can use docker-compose to update all your containers with 2 commands, and you can create a task to run it periodically. You can check here: https://www.linuxserver.io/2017/06/24/th...rver-2017/
Reply
#12
Since Docker on Synology got updated WatchTower now works fine for updating. Been running it for a few weeks now without issue.
Reply
#13
(21-10-2017, 12:25 AM)aptalca Wrote: Here's a sample bash script I use to update a mariadb container:

Code:
#!/bin/bash

echo "<------------------------------------------------->"
echo
echo "<------------------------------------------------->"
echo "Updating docker containers on" $(date)
echo "<------------------------------------------------->"
echo "Updating images"
docker pull linuxserver/mariadb
echo "Attempting to stop any containers already running. . ."
docker stop mariadb
echo "Attempting to remove any existing containers. . ."
docker rm mariadb
echo "Deleting any stale images. . ."
docker rmi $(docker images | grep "linuxserver/mariadb" | grep '<none>' | sed 's/\s\+/\t/g' | cut -f3)
echo "Creating new containers. . ."
docker create \
 --name=mariadb \
 -e PUID=1000 \
 -e PGID=1000 \
 -e MYSQL_ROOT_PASSWORD=pass \
 -e TZ=America/New_York \
 -p 3306:3306 \
 -v /home/user/mariadb:/config \
 linuxserver/mariadb

echo "Starting the new containers. . ."
docker start mariadb
echo "Completed on" $(date)

You can also separate out the docker pull part into another script and run it off of cron every Saturday (our images are refreshed Friday nights)

And the container update script above can run on boot, or manually

Thank you for that.  I have been looking but can't find how you would put internal links in between docker containers.  I look at my container and it contains:

 "Links": [
                "/Sabnzbd:/Radarr/sabnzbd",
                "/Transmission-openvpn:/Radarr/transmission"
            ],

How would you put that in the script?

Also with volumes how do you indicate if they are RO?

thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)

About LinuxServer.io

Focus MyBB Theme is designed for MyBB 1.8 series and is tested properly till the most current version of MyBB i.e. 1.8.9. It is simple, clean and light MyBB theme with use of font-awesome icons and shrinking header.

For any more information, please use our contact form.

              Quick Links

              User Links

              Advertise