I last blogged about Docker here and have been playing with it ever since. I thought the configuration and how I use docker on FreeNAS might make an interesting update, so here it is!
So a little background first. I’m still running Docker inside a Ubuntu 16.4 byhve virtual machine (VM) on FreeNAS 11.1-U4. The VM is also running CrashPlan and OnlyOffice Document Server. I’m using Portainer to manage the Docker containers through a GUI, and it is this that prompted the blog. Probably best to just show you a screenshot of what it all looks like…
Nice, yes? Well, I think so but it’s taken much trial and error to get to this point and who knows whether this is even the best way of using Docker and/or Portainer?
When I started playing with Docker, I was manually creating containers from the Ubuntu command line, and whilst this was good for understanding how things works, it was painful when the VM needed to be restarted, or where I wanted to make changes to containers.
Next, I started to look into Docker Compose and started to build a single docker-compose.yml file, with the configuration for almost all of the main containers I was using. This made things a little easier, but still lacked some of the flexibility of my new approach, which only came about after upgrading from Portainer 1.16.1 to 1.19.1. This introduces the concept of Stacks, which allows you to group containers together, and create/edit individual compose files for each stack, or at least that’s how I’m using it!
I’ve taken my ever-growing docker-compose.yml file and created a number of Stacks with basically the same configuration:
Core
When I was playing with web services in FreeBSD jails, I’d created a jail called FEMP which was simply a FEMP (FreeBSD, [E]NGINX, MySQL, PHP) stack. It’s my only warden based jail I have running, and I suspect most of the things I was using in that will migrate to Docker containers, but I thought I’d try replicating the ‘stack’.
It’s running on a Linux VM, so this is just containers for NGINX,
Apps
These are the main applications I’ve been using Docker for – WordPress, OnlyOffice Community Server/Sphinx, and LimeSurvey.
I have an iocage jail running my main WordPress solution, but the Docker one is handy for testing and playing with new sites. I only came across OnlyOffice as a Document Editor for ownCloud/Nextcloud, but the Community Service is so much more, and a pretty powerful CRM and Project Management tool. Still really just playing with it, but there’s no FreeBSD port. Playing a little with LimeSurvey too, although if I use that in anger I might look at creating in a FreeBSD jail.
HA
This is running my Home Automation (HA) stuff, which at this point just Home Assistant. It’s also running an App Daemon that works with Home Assistant, although I still haven’t managed to get it configured to do what I want!
emby
I played around a little with emby in a Docker, although think it works better in an iocage jail, at least for my configuration. I still have the container, but it’s not kept up to date or used in anger.
I am running a couple of ‘statistics’ containers which are very early alpha solutions, which I hope at some point in the future might replace the PlexPy shaped hole when I moved from Plex to emby.
Photo
I’d been playing around with these – Zenphoto and Lychee – some time ago in my FEMP jail above, but they were so easy to set-up as Docker containers. Still not using either in anger, but I’ll be trying to work out which fits my needs the best.
I’ve got some other containers outside the stacks, but think I’ll move these into stacks at some point. It’s mainly things I’ve been playing with that I don’t think I can get to work using Docker, but I haven’t completely given up – Zimbra and a Glassfish/MSSQL server. It’s should only be Portainer itself that lives outside the stacks.
Anyway, quite a bit longer than I’d expected. If you find this and have been bothered to read this far, leave me a comment. Are you using Docker on FreeNAS? How are you doing it and should I be doing things differently?
Trackbacks/Pingbacks