News: Link to old message forum

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - diddly

Pages: 1 [2] 3 4 ... 11
16
General Discussion / Docker Update Checker
« 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.

17
News / Re: Stable Diffusion
« 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.


18
News / Re: Zellers Coming Back!
« 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.


19
General Discussion / Re: Board Games Owned
« 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

20
News / Zellers Coming Back!
« 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.

21
News / Re: Toots
« 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.

22
News / Toots
« 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

23
News / Re: Old Message Forum
« 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.

24
News / Old Message Forum
« 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.

25
News / Re: Stable Diffusion
« on: September 13, 2022, 10:08:47 PM »
surrealist painting of a duck wearing a top hat on its head while standing on the bank of a river

26
News / Re: Stable Diffusion
« on: September 13, 2022, 09:21:32 PM »
a crayon drawing of Donald Trump eating a cheeseburger at his desk in the oval office of the white house, with food dripping onto papers on the desk

27
News / Re: Stable Diffusion
« on: September 11, 2022, 10:36:02 PM »
A woman walks her dog, in the style of Monet

28
News / Re: Stable Diffusion
« on: September 11, 2022, 10:35:27 PM »
Predator steps through the Stargate

29
News / Stable Diffusion
« on: September 11, 2022, 10:34:28 PM »
You might have heard recently of an AI called Stable Diffusion that can generate images from text prompts.  I just installed it on my M1 Mac Mini tonight using a tool called DiffusionBee and put it to work.

Among the images I had it create were "The Predator steps through The Stargate", "Two Galleons battling at sea during sunset", and "a woman walking her dog, in the style of Monet".

It takes a while to run, since I have only 8GB of RAM instead of the recommended 16GB.  It does still work though, as you can see.

30
News / Re: Netflix Considering Ads
« on: April 22, 2022, 01:25:38 PM »
Interesting point to consider: People have learned to jump between streaming services and binge, rather than pay a regular monthly rate.
Quote
Why pay $20 a month for Netflix when you can pay $20 every four months and watch the final season of Ozark, the second seasons of Bridgerton and Witcher and Squid Game in one month, and move to another streamer the next month and watch all of their offerings?
- The Bottom Is Dropping Out of Netflix By Dustin Rowles

Pages: 1 [2] 3 4 ... 11