Skip to main content

Tech notes

Random IT tests, fixes and and findings that might help others.

Copyright, all rights reserved.

In this collection

Setting up PHP with GD2 image library in Docker

I put together some scripts to set up a dockerised PHP-Apache2 environment. Dockerhub actually has official images for this, but the problem is that they don't include the GD2 image library, you have to compile it in yourself. So, my scripts do that. They also create a persistent volume via a bindmount on the host machine, so that you can freely remove or rebuild the webserver container without losing your website data. 

How to set up a WireGuard VPN server in a Docker container

Tired of paying for a commercial VPN? I set up a private WireGuard VPN server, running in a Docker container on a cheap virtual machine I already have with Linode. No need to pay for additional infrastructure! It works straight out of the box, and is fast and simple to set up. This article closes a few gaps in the documentation that might slow you down. Set up time was about 10 minutes, including configuring client devices. It's a nice facility to have, and is so lightweight you can run it on existing infrastructure without paying anything more.

Heroku throws students, non-profits and other freeloaders under the bus

In a blog post annoying titled Heroku's Next Chapter, Heroku's General Manager has announced they will discontinue their free plans. On 28 November they will reduce free resources to zero and start deleting hobby-dev databases. Yep, they are going to bin your data with no warning other than an email, to "manage fraud and abuse". The good news is that you don't need them. Get your virtual machines from a cloud provider and containerise your apps with Docker instead. You'll never look back.

Thoughts on the Gl.iNet Beryl (GL-MT1300) travel router

The marketing materials lean heavily on its ‘advanced security features’, but TLDR it doesn’t have any, unless you think VPN capability is something special. It’s just a small, portable wireless router that can accept a WIFI signal as its WAN input. So you can use it in a coffee shop and have a firewall between you and their network, but the firewall is just like any other home router firewall. You can forward ports and so on, but that’s about it, and it doesn’t provide any visibility into the traffic or what’s going on. Sadly, it does not support DFS channels (52-140) on fast 5GHz WIFI, so it is not compatible with any access point using them.

Firewalla Purple thoughts

The Firewalla Purple brings firewall management to the masses: It has a great GUI that makes it easy for less-technical users to see what is happening on your network and to manage devices. Firewall rules are easy to set up and content filtering policies can be toggled on and off by device or group. There are a few minor shortcomings but the feature set is still being extended. The Purple is an excellent device for managing small networks and the online activities of children. However, it is highly overpriced.

Excellent free stock photos - unsplash.com

Trying to find truly free stock photos has always been painful. Usually, the available 'free' resources come with unwieldly terms such as the requirement to publicly attribute the source or acknowledge the author. Now I fully support the Creative Commons licenses for literary works, but you just can't plaster attributions across the artwork for a brochure, website banner or logo. It's not an appropriate model. Recently I stumbled upon unsplash.com, a stock photo site that is actually free, has a remarkably permissive license, and is also excellent.

How to boot a headless Raspberry Pi from USB SSD

Running a Raspberry Pi from an SSD is a lot faster and more reliable than from a flash card. But how to move the OS to the SSD when you don't have access to the desktop utilities or an external M.2 enclosure? TLDR: Boot from a flash card / desktop version of Raspberry Pi OS first, use Raspberry Pi Imager utility to copy your OS of choice onto the SSD, and change the boot order to SSD-priority using raspi-config. You can then get rid of the flash card entirely or keep it as a backup OS.

Mapping demo: Batemans Bay to Canberra GPS track

A demonstration of Tuskfish's mapping capabilities. This track was recorded on my Garmin Forerunner 245 watch, as I drove back from Batemans Bay on the south coast to Canberra. The map is automatically generated from an exported .kml file of the track, which Google Maps can put bounds around. The tracks are downloadable so others can use them on their own devices if they wish. You can also prepare maps in Google Earth or Google Maps itself.

How to setup SSL in an Apache2 Docker container running as a non-root user

TLDR: You can't do it directly in standard Docker, unless you run the container as root, or weaken the file ownership permissions, which you should not do. That's why you're having so much trouble finding a working example with a non-root user. Even the official docs example doesn't set a user...which means the container will default to running as root. But I have a solution!

How to find the path to php.ini

php --ini

You're welcome.