Is this the way i should be automating updating docker images or is there some better method I should be doing? I have them all in /opt/docker and then created a update_image.sh file with the following
for d in *; do
if [ -d "$d" ]; then
cd $d;
docker compose pull && docker compose up -d --remove-orphans;
cd /opt/docker;
echo "";
fi
done
docker image prune -af;
Then i have a cronjob like for monday at 2am
0 2 * * 1 sh /opt/docker/update_image.sh