News: Link to old message forum

Recent Posts

Pages: 1 [2] 3 4 ... 10
11
Diddlycraft Discussion / Re: Halloween in Diddlycraft
« Last post by diddly on October 18, 2023, 08:58:51 PM »
It's Halloween in Diddlycraft.  As always, find the jack-o-lanterns for treats and XP!
12
General Discussion / Docker Update Checker
« Last post by diddly on May 09, 2023, 11:29:29 AM »
Docker is what I use to run a lot of my services (including this web site!).  It keeps them contained and avoids having to clutter my host server with all sorts of dependencies needed by each service.  It also makes staying updated easier.

However.

I used to use Portainer to manage my docker images and containers.  Works great but for one of my services, rather than just downloading the updated image, it would download ALL images from all time for all architectures.  Basically, it would fill my disk if I let it.  So I moved away from Portainer.

Watchtower sounded like it did what I wanted, but I kept reading it was unsupported, then back, then deprecated, then back, then retired.  Not instilling me with confidence.

So I went wholly command line, writing scripts that would download the latest image, create the container, and update.  I still didn't know if there were updates actually available.  I just forced it every so often.

Today I found on Stack Overflow a script that lets me know if there's updates available for any of my running containers.

Code: [Select]
#!/bin/bash

DATAPATH='/data/docker/updater/data'

if [ ! -d "${DATAPATH}" ]; then
        mkdir "${DATAPATH}";
fi
IMAGES=$(docker ps --format "{{.Image}}")
for IMAGE in $IMAGES; do
        ORIGIMAGE=${IMAGE}
        if [[ "$IMAGE" != *\/* ]]; then
                IMAGE=library/${IMAGE}
        fi
        IMAGE=${IMAGE%%:*}
        echo "Checking ${IMAGE}"
        PARSED=${IMAGE//\//.}
        if [ ! -f "${DATAPATH}/${PARSED}" ]; then
                # File doesn't exist yet, make baseline
                echo "Setting baseline for ${IMAGE}"
                curl -s "https://registry.hub.docker.com/v2/repositories/${IMAGE}/tags/" > "${DATAPATH}/${PARSED}"
        else
                # File does exist, do a compare
                NEW=$(curl -s "https://registry.hub.docker.com/v2/repositories/${IMAGE}/tags/")
                OLD=$(cat "${DATAPATH}/${PARSED}")
                if [[ "${VAR1}" == "${VAR2}" ]]; then
                        echo "Image ${IMAGE} is up to date";
                else
                        echo ${NEW} > "${DATAPATH}/${PARSED}"
                        echo "Image ${IMAGE} needs to be updated";
                        H=`hostname`
                        ssh -i /data/keys/<KEYFILE> <USER>@<REMOTEHOST>.com "{ echo \"MAIL FROM: root@${H}\"; echo \"RCPT TO: <USER>@<EMAILHOST>.com\"; echo \"DATA\"; echo \"Subject: ${H} - ${IMAGE} needs update\"; echo \"\"; echo -e \"\n${IMAGE} needs update.\n\ndocker pull ${ORIGIMAGE}\"; echo \"\"; echo \".\"; echo \"quit\"; sleep 1; } | telnet <SMTPHOST> 25"
                fi

        fi
done;

Personally, I commented out the ssh line that does email notification, and will just run the script manually to check my images.  Clearly this was meant as a cron job that would run automatically, which you could do if so inclined.

I just wanted to capture this here should I need to find it again, and for anyone else who might be looking for a scripted solution.
13
News / Re: Stable Diffusion
« Last post by diddly on March 28, 2023, 01:36:12 PM »
Microsoft Bing has added AI Image Generation.  This was the one time I intentionally went to that site.  Here is a suitable image I generated.

14
News / Re: Zellers Coming Back!
« Last post by diddly on March 23, 2023, 09:40:03 AM »
Zellers Diner on wheels!  They're adding a Food Truck that will appear at different locations to serve up some classic fare.  The schedule thus far is:
March 23: Scarborough Town Centre in Scarborough, Rideau Centre in Ottawa, Sunridge Mall in Calgary and the Kingsway Garden Mall in Edmonton.
March 24: St. Laurent in Ottawa and White Oaks Mall in London
March 25: Erin Mills Town Centre in Mississauga, Cataraqui Town Centre⁣ in Kingston, Cambridge Centre in Cambridge and the Medicine Hat Shopping Mall in Medicine Hat.
March 26: Burlington Mall in Burlington and Pen Centre Shopping Plaza in St. Catharines.

15
General Discussion / Re: Board Games Owned
« Last post by diddly on January 24, 2023, 09:00:45 PM »
I've decided that updating the table at the top of this thread is tedious, so am instead maintaining my collection on BoardGameGeek.  A pleasing visual display of anyone's collection can be found on https://gameshelf.io.  Mine is here
16
News / Zellers Coming Back!
« Last post by diddly on January 18, 2023, 09:59:21 AM »
In this day of high inflation and mass layoffs, it will be refreshing to have another discount department store other than just Walmart.  HBC, who owns the Zellers brand, has announced they're opening new stores, including one in Cambridge!  After Target lost $5.4 Billion trying to replace Zellers in Canada, I really hope the original is able to come back strong.  I actually liked their little in-store restaurant, and it was always the first store I'd visit for new every-day-wear clothes.  The price was right.
17
News / Re: Toots
« Last post by diddly on November 16, 2022, 11:34:23 AM »
It really seems Musk is trying to kill Twitter completely.  Now he's demanding the remaining employees to work long hours at high intensity or be fired.  After also firing employees on Twitter for daring to correct false statements, he's not inspiring any loyalty.
18
News / Toots
« Last post by diddly on November 10, 2022, 01:50:49 PM »
Let's face it.  Twitter is done.  Elon Musk has killed it by laying off half the employees, banning remote work, adding a monthly subscription cost, and even considering putting content behind a paywall.

Twitter users are looking for a new home, and many of them are flocking to Mastodon.  This is a distributed social media that's been around for several years, and lets you host your own serverDarkshade even has an instance!

It's like twitter, but tweets are called toots (following the elephant theme) and accounts are named @user@server.  You can follow me @diddly@darkshade.social
19
News / Re: Old Message Forum
« Last post by diddly on November 06, 2022, 04:31:05 PM »
It's alive!  I got the old message forum (read-only) working again by another means.  All the old content is back online.
20
News / Old Message Forum
« Last post by diddly on October 30, 2022, 10:12:13 PM »
Time marches on, and the ability to run our old message forum has been lost with recent system updates.  If there were posts you want to revisit, there does exist a snapshot on the wayback machine at archive.org.

The current message forum is still fine though since it's much more recent software.
Pages: 1 [2] 3 4 ... 10