My Docker Setup

I tried out the docker build a couple months ago and have not looked back. At all.
Everything is done set up, a tweak here and there and it’s done. The config stuff is stored in another location, if I screw the system up, just delete the image and start over in a minute.
I currently run Home Assistant, AppDaemon, HADashboard, MQTT, Node-Red, InfluxDB, Grafana and a couple dozen more different apps on an old Dell 1950 blade. I’m planning on breaking them all down to a bunch of RPIs over the summer. Using the docker setup, I should be able to just transfer the data folders over, fire up the images and keep it moving.

These are additional apps I use to manage things and it’s working out marvelously:
Portainer - web based interface to start/stop/restart get a shell and view log and errors etc.
Watchtower sits and watches for updates to the docker images and automatically updates them. I never have to update HA manually anymore.

To keep track of all this stuff and access the pages I use Organizr - It’s a Cool front end, makes all your junk accessible from one page.

11 Likes

Thanks for sharing your insights.

Very interesting! I’m intrigued by the the concept behind docker but not really confident enough yet to dip my toes into it.
Do you have separate docker container for each application?

You can take a look at hass.io which is a ready-made docker installation with HA and a bunch of other things.

1 Like

My understanding of docker is that it creates an independent system environment (container) for each app. (please correct me if I am wrong people)

Here’s a some screens of the Portainer home I have setup: (via Organizr - icons on left take you to respective pages)

1 Like

I have been looking around a bit and a problem I have noticed is that it can be hard to find arm containers for all applications you want. Something to consider when moving over to a raspberry pi.

look here

Did you move things over from the Dell 1950? Why did you want to break it down to individual RPIs?

Do you use docker compose? Is your config file shared anywhere?

sorry for the delayed reply.
I never got around to moving the stuff over to rpi at least not yet. It is a cost and noise pollution move.

did not use docker compose. basically pulled all the dockers info from here

Can you post your docker-compose file?

1 Like

this is the text file I have with all the accumulated docker stuff. ymmv

Plex

docker run -d --name plex --restart=always --net=host -e TZ=“America/New_York” -e PLEX_UID=0 -e PLEX_GID=0 -v /home/sysop/docker/containers/plex/config:/config -v /mnt/media:/media -v /home/sysop/docker/containers/plex/transcode:/transcode -v /home/sysop/storage/jedia:/storage/jedia --device /dev/dri:/dev/dri plexinc/pms-docker:plexpass

Plex RPI

docker create --name=plex --restart=always --net=host -e PUID=0 -e PGID=0 -v /home/pi/docker/containers/plex/config:/config -v /mnt/media/Series:/data/tvshows -v mnt/media/movies:/data/movies -v /mnt/media/transcode:/transcode lsioarmhf/plex

docker run -d --name=sabnzbd --restart=always -p 8580:8080 -p 9590:9090 -v /home/sysop/docker/containers/sabnzb/config:/config -v /mnt/media/downloads:/downloads -v /mnt/media/incomplete-downloads:/incomplete-downloads -v /mnt/media:/media -e PGID=0 -e PUID=0 -e TZ=“America/New_York” linuxserver/sabnzbd

NZBget

docker run -d --name nzbget --restart=always -p 6798:6789 -e PUID=0 -e PGID=0 -v /home/sysop/docker/containers/nzbget/config:/config -v /mnt/media/downloads:/downloads -v /mnt/media:/media linuxserver/nzbget

Sonarr

docker run -d --name sonarr --restart=always -p 8989:8989 -e PUID=0 -e PGID=0 -v /dev/rtc:/dev/rtc:ro -v /home/sysop/docker/containers/sonarr/config:/config -v /mnt/media/downloads/completed/Series:/downloads/completed/Series -v /mnt/media/Series:/media/Series linuxserver/sonarr

radarr

docker run -d --name=radarr --restart=always -p 7878:7878 -e PGID=0 -e PUID=0 -e TZ=“America/New_York” -v /home/sysop/docker/containers/radarr/config:/config -v /mnt/media/downloads/completed/Movies:/downloads/completed/Movies -v /mnt/media/Movies:/media/Movies linuxserver/radarr

Couch Potato

docker run --name=couchpotato --restart=always -p 5050:5050 -e PGID=0 -e PUID=0 -v /etc/localtime:/etc/localtime:ro -v /home/sysop/docker/containers/couchpotato/config:/config -v /home/sysop/docker/downloads:/downloads -v /home/sysop/docker/downloads/completed/Movies:/downloads/completed/Movies -v /mnt/media/Movies:/media/Movies linuxserver/couchpotato

plexpy

docker run -d --name=plexpy --restart=always -p 8181:8181 -e PGID=0 -e PUID=0 -v /etc/localtime:/etc/localtime:ro -v /home/sysop/docker/containers/plexpy/config:/config -v /home/sysop/docker/containers/plex/config/Library/Application\040Support/Plex\040Media\040Server/Logs:/logs:ro linuxserver/plexpy

Headphones

docker run -d --name=headphones -p 8282:8181 --restart=always -e PGID=0 -e PUID=0 -e TZ=“America/New_York” -v /home/sysop/docker/containers/headphones/config:/config -v /mnt/media:/media linuxserver/headphones

################################################################################################

Unifi

docker run -d --name=unifi --restart=always --net=host -p 8080:8080 -p 8081:8081 -p 8443:8443 -p 8843:8843 -p 8880:8880 -e PGID=0 -e PUID=0 -v /etc/localtime:/etc/localtime:ro -v /home/sysop/docker/containers/unifi/config:/config linuxserver/unifi

docker run --rm --net=host -e TZ=“America/New_York” -v ~/unifi/data:/var/lib/unifi -v ~/unifi/logs:/var/log/unifi --name unifi jacobalberty/unifi:unifi5

Portainer

docker run --restart=always --name=portainer -d -p 9100:9000 -v /home/sysop/docker/containers/portainer/config:/data -v /var/run/docker.sock:/var/run/docker.sock portainer/portainer

Portainer Pi

mkdir -p /home/pi/docker/containers/portainer/config
mkdir -p /var/run/docker.sock:/var/run/docker.sock
docker run --restart=always --name=portainer -d -p 9100:9000 -v /home/pi/docker/containers/portainer/config:/data -v /var/run/docker.sock:/var/run/docker.sock portainer/portainer --no-auth

Minimux

docker run --name=muximux -p 82:80 -p 445:443 --restart=always -v /home/sysop/docker/containers/muximux/config:/config linuxserver/muximux

glances - console

#docker create --name=glances --restart=always -v /var/run/docker.sock:/var/run/docker.sock:ro --pid host -it docker.io/nicolargo/glances

glances - web

docker create --restart=always --name=glances -p 61208-61209:61208-61209 --restart=always -e GLANCES_OPT="-w" -v /var/run/docker.sock:/var/run/docker.sock:ro --pid host docker.io/nicolargo/glances

nana assistant:

docker create --name=nana-assistant --restart=always -v /home/sysop/nanassistant:/config -v /etc/localtime:/etc/localtime:ro --net=host homeassistant/home-assistant

home assistant:

docker run -d --name=home-assistant --restart=always -v /home/sysop/homeassistant:/config -v /etc/localtime:/etc/localtime:ro --net=host --privileged -v /dev/ttyUSB0:/dev/ttyUSB0 homeassistant/home-assistant

docker run -d --name=appdaemon --restart=always -v /home/sysop/docker/containers/appdaemon/conf:/conf appdaemon:latest

hydra

docker create --name=hydra -p 5075:5075 --restart=always -e PGID=0 -e PUID=0 -e TZ=“America/New_York” -v /home/sysop/docker/containers/hydra/config:/config -v /home/sysop/docker/downloads:/downloads linuxserver/hydra

mqtt

rpi

sudo mkdir -p /home/pi/docker/containers/mqtt/config
sudo mkdir -p /home/pi/docker/containers/mqtt/log
sudo mkdir -p /home/pi/docker/containers/mqtt/data/
sudo docker create --name mqtt -p 1883:1883 -p 9001:9001 --restart=always -ti -v /home/sysop/docker/containers/mqtt/config:/mqtt/config:ro -v /home/sysop/docker/containers/mqtt/log:/mqtt/log -v /home/sysop/docker/containers/mqtt/data/:/mqtt/data/ jonasheinisch/rpi-mqtt

sudo docker create --name mqtt -p 1883:1883 -p 9001:9001 --restart=always -ti -v /home/sysop/docker/containers/mqtt/config:/mqtt/config:ro -v /home/sysop/docker/containers/mqtt/log:/mqtt/log -v /home/sysop/docker/containers/mqtt/data/:/mqtt/data/ toke/mosquitto

homebridge

docker create --name=homebridge --restart=always --net=host -e TZ=“America/New_York” -v /home/sysop/docker/containers/homebridge:/homebridge oznu/homebridge

docker create --name=homebridge --restart=always --net=host -e TZ=“America/New_York” -v /home/sysop/docker/containers/homebridge:/config moutten/homebridge

nodered

docker create --name nodered --restart=always -it -p 1880:1880 -v /home/sysop/docker/containers/node-red-data:/data -v /home/sysop/.ssh:/ssh nodered/node-red-docker

motioneye

docker create --name motioneye --restart=always -p 8091:8081 -p 8765:8765 -e TIMEZONE=“America/New_York” -e PUID=“0” -e PGID=“0” -v /home/sysop/docker/containers/motioneye/media:/home/nobody/media -v /home/sysop/docker/containers/motioneye/config:/config jshridha/motioneye:latest

mysql

docker run -d --name mysql --restart=always -p 3306:3306 -v /home/sysop/docker/containers/mysql:/var/lib/mysql -e MYSQL_ROOT_HOST=172.17.0.21 -e MYSQL_ROOT_PASSWORD=stinkycemo mysql/mysql-server

phpmyadmin

docker create --name myadmin --restart=always --link mysql:db -p 8383:80 phpmyadmin/phpmyadmin

influxdb

docker create --name influxdb --restart=always -p 8083:8083 -p 8086:8086 -v /home/sysop/docker/containers/influxdb:/var/lib/influxdb influxdb

grafana

docker create --name=grafana --restart=always -i -p 3000:3000 grafana/grafana

UI for docker

docker run --name=ui4docker --restart=always -d -p 9000:9000 --privileged -v /var/run/docker.sock:/var/run/docker.sock uifd/ui-for-docker

Zoneminder

docker run -d --name=zoneminder --restart=always -p 89:80 --privileged=true -v /home/sysop/docker/containers/zoneminder/config:/config:rw -v /etc/localtime:/etc/localtime:ro aptalca/zoneminder-1.29

postgresdb

docker run -d --name=postgresdb --restart=always -v /home/sysop/docker/containers/postgresql/data:/var/lib/postgresql/data -e POSTGRES_USER=odoo -e POSTGRES_PASSWORD=odoo postgres:9.4

-v /home/sysop/docker/containers/postgresql/data:/var/lib/postgresql/data

docker create --name=webmin --restart=always -p 10000:80 -v /home/sysop/docker/containers/webmin:/var/run/container-control tragus/webmin

docker start plex couchpotato plexpy radarr sonarr unifi openvpn-as observium crashplan nzbget muximux watchtower home-assistant glances headphones homebridge nodred hydra mqtt mysql myadmin influxdb
docker start openvpn-as observium crashplan muximux watchtower

Partkeepr

docker run -d --restart=always -p 9080:80 --name partkeepr mhubig/partkeepr

Beets

docker run -d --restart=always --name=beets -v /home/sysop/docker/containers/beets/config:/config -v /mnt/media/Music:/music -v /home/sysop/docker/downloads/completed/Music:/downloads -p 1234:8337 linuxserver/beets

docker run -d --name docker-statsd-influxdb-grafana --restart=always -p 3003:3003 -p 3004:8083 -p 8086:8086 -p 22022:22 -p 8125:8125/udp samuelebistoletti/docker-statsd-influxdb-grafana:latest

watchtower

docker run -d --name watchtower --restart=always -v /var/run/docker.sock:/var/run/docker.sock v2tec/watchtower

shairport jedberry

docker run -d --restart always --name shairport --net host --device /dev/snd -e AIRPLAY_NAME=JedBerry evansalter/shairport-sync-docker-pi

docker run -d --restart always --name shairport --net host --device /dev/snd -e AIRPLAY_NAME=Jungle evansalter/shairport-sync-docker-pi

shairport moberry

docker run -d --name shairport --restart=always --net host --device /dev/snd -e AIRPLAY_NAME=MoBerry luxus/rpi-docker-shairport-sync

musicbrainz

docker create --name=musicbrainz --restart=always -e WEBADDRESS=192.168.1.4 -p 5500:5000 -v /home/sysop/docker/containers/musicbrainz/config:/config -v /home/sysop/docker/containers/musicbrainz/config:/data -e PGID=1000 -e PUID=1000 -e TZ=“America/New_York” -e BRAINZCODE= xxxxxxxxx linuxserver/musicbrainz

organizr

docker create --name=organizr -v /home/sysop/docker/containers/organizr/config:/config -e PGID=1000 -e PUID=1000 -p 83:80 lsiocommunity/organizr

openvpn

docker create --name=openvpn-as --restart=always -v /home/sysop/docker/containers/openvpn-as/config:/config -e PGID=1000 -e PUID=1000 -e TIMEZONE=“America/New_York” -e INTERFACE=eth0 --net=host --privileged linuxserver/openvpn-as

hadashboard

docker run --name=“hadashboard” -d --restart=always -v /home/sysop/docker/containers/hadashboard/dashboards:/app/dashboards -v /home/sysop/docker/containers/hadashboard/lib/ha_conf.rb:/app/lib/ha_conf.rb -v /home/sysop/docker/containers/hadashboard/hapush:/app/hapush --net=host hadashboard

chronograf

docker pull quay.io/influxdb/chronograf:1.3.2.1

influxdb:

docker run -d --restart=always -p 8086:8086 -v /home/sysop/docker/containers/influxdb:/var/lib/influxdb influxdb

grafana

docker run -d --restart=always -p 3001:3000 -v /home/sysop/docker/containers/grafana:/var/lib/grafana -e “GF_SECURITY_ADMIN_PASSWORD=8852363” grafana/grafana

kapacitor

docker run -d --name=kapacitor --restart=always -p 9092:9092 -v /home/sysop/docker/containers/kapacitor/conf:/etc/kapacitor -v /home/sysop/docker/containers/kapacitor/lib:/var/lib/kapacitor kapacitor

chronograf

docker run -d --restart=always -p 8888:8888 -v /home/sysop/docker/containers/chronograf:/var/lib/chronograf chronograf

telegraf

docker run -d --name=telegraf --net=influxdb -v /home/sysop/docker/containers/telegraf/telegraf.conf:/etc/telegraf/telegraf.conf:ro telegraf
docker run --restart=always --name=telegraf -v /home/sysop/docker/containers/telegraf/telegraf.conf:/etc/telegraf/telegraf.conf:ro telegraf

gekko

docker run -d --name gekko --restart=always -p 3005:3000 -v /home/sysop/docker/containers/gekko/history:/usr/src/gekko/history -v /home/sysop/docker/containers/gekko/config.js:/usr/src/gekko/config.js -v /home/sysop/docker/containers/gekko/web/vue:/usr/src/gekko/web/vue barnumd/gekko

13 Likes

I’ve just got HA running in Docker, but have zero experience of Docker. How do I run hass commands in a Docker environment (e.g. hass --script check_config to check my HA config?)

itm196027d
I’ve just got HA running in Docker, but have zero experience of Docker. How do I run hass commands in a Docker environment (e.g. hass --script check_config to check my HA config?)>

I agree i tried to bash into the container and couldnt accomplish.
Also if anyone knows how to get working w/ the reverse proxy/letsencrypt that’d be grand as well.

Portainer makes getting shell in docker container easy

Generally shell command is something like
sudo docker attach -it containername /bin/bash

I’m using portainer to manage all my docker containers, it’s been great. What’s the best way to backup all your container config so you can get them up an running if something happens to your host?

just started doing backups of my server last night after months of looking into solutions and putting it off.

rsync is the winner

I looked into bacula and it is super complex and slightly more than I need(by a lot).
I prefer command line for simplicity and other GUI options outside of bacula just seemed more complex than needed
“rysnc -a /pathto/orig_folder /pathto/ backup_folder” is all it takes and after doing my backup of my movie folder I realized this is more than enough

I plan to have a monthly backup thats replaced monthly and biannual replaced every six months of configs
I will have monthly of static items (movies, music, etc). These I will update new only, never delete or replace.
I have decided to eliminate Raid Array in favor of local and offisite backups. This adds drive space for me but provides better solution for recovery in case of failure.

Hi,

You may want to look into rdiff-backup or backupninja (which uses rdiff-backup too) as they can do incremental/differential backups. I used to use crash plan for backups (more offsite than local) but after they ended the user plans I switched to duplicati. For the music/movies items I use greyhole with success.

I think all those are based off librsync (rsync). Rsync is differential backup.

I am looking into encrypted backup. This is not super critical since it’s just stuff like movies and non supersecret files but just for thoroughness I will be looking for encrypted backup solution.

Duplicity looks good. I saw this and think it may be good solution. I think running this in docker may be just the trick.
https://www.nixtutor.com/linux/off-site-encrypted-backups-using-rsync-and-aes/

For backups I’d recommend Restic:

https://restic.net/

1 Like

Hi,

I’m trying to move my zoneminder vm to a docker container but couldn’t find a good one. The one you are using is the 1.29 version. Did you get a newer one? thanks in advance!

p.s. it seems that there’s not a official docker file yet, and the ones i tried didn’t worked :-(.