All aboard
Raspberry Pis run a Linux Operating System, probably the most used OS in the world, and it’s open source, meaning (in general) anyone can use it, modify it and redistribute it, all for free.
So far the software for my Pi shop has been completely free, there are opportunities to pay to support the developers, but no requirement to do so. WordPress, the software to create this site and used by almost half of all websites, is also free. It uses many plugins that are free in a minimalist version with desired features available in a paid version, but that’s a tale for another post, today’s is about Docker.
Docker is a framework that sits on the OS (Windows, Mac, Linux) and supports containers. Containers hold isolated and secure installations of software apps & services. Prior to containerization of software & services there could be contention issues on libraries & resources, as well as security issues where malware could access data from other apps. By using containers these issues are no longer of concern. Software install and set up is fairly simple & standardized, after all, even I’ve been successful building my Pi shop.
There are lots of people making YouTube videos and posting blogs that helped with guidance on my journey.
One of the most helpful was Novaspirit Tech and their Pi Hosted series. The Github repository where the scripts and resources to setup and configure the self-hosted services mentioned in the videos are kept and you will become familiar with if you go down this path. This is also a great way to learn more about Docker, containers & Portainer, oh my.
After installing Docker, which is a command line tool (CLI) the first container to install is Portainer, a GUI to manage Docker and the rest of the containers you will install.
Pi hole is a network-wide ad blocking service and must have on every home network IMHO. Simply grab a few lists from the firebog collection to add to your Pi hole and you will see no more ads, yipee.
If you watch the Pi-hosted series you will soon find that there are more than 200 free apps in the template to select from, with hundreds more on the docker hub (library) of container images. In subsequent posts I will identify the one’s I’ve selected to be on my home lab.
Here is a sample Docker yaml script I’m using to install two containers; the first is piwigo, a photo display app, which depends on the 2nd container for the maria database to hold all the data for the photo album. There are some users, some port settings and some paths defined (volumes). This is typical of settings for every container in Docker.
services:
piwigo:
image: lscr.io/linuxserver/piwigo:latest
container_name: piwigo
environment:
- PUID=1000
- PGID=1000
- TZ=America/Los_Angeles
volumes:
- /portainer/Files/AppData/Config/piwigo/config:/config
- /uppercrust/firstcut/Keepers:/gallery
ports:
- 8083:80
restart: unless-stopped
depends_on:
- maria_db
maria_db:
image: linuxserver/mariadb:latest
container_name: piwigo_db
ports:
- 3306:3306
environment:
- PUID=1000
- PGID=1000
- MYSQL_ROOT_PASSWORD=MySqlPassword
- TZ=America/Los_Angeles
- MYSQL_DATABASE=piwigo_db
- MYSQL_USER=myuser
- MYSQL_PASSWORD=mypassword
volumes:
- /portainer/Files/AppData/Config/piwigo/DB:/config
restart: unless-stopped
As you can see, not much to it and nothing to be intimidated by. If things don’t go right, or later you decide you want to change or remove it’s simply a matter of stopping the service and deleting the container. Modifying the script as needed and rerunning it will recreate the container with it’s software.
Whether you are interested in monitoring your home (home automation) or your network (intrusion & threat detection) or your computer (CPU temp & activity) or serve your media, there is a free container that will help you do that.
Leave a Reply