Docker
Docker Install
sudo pacman -Sy docker docker-compose
Mounting a drive for docker images
mkdir -p /var/lib/libvirt/images/usb001/docker
mount /dev/sdb1 /var/lib/libvirt/images/usb001
Change docker default directory
/etc/docker/daemon.json
{
"data-root": "/var/lib/libvirt/images/usb001/docker"
}
Install DHCP Plugin
docker plugin install ghcr.io/devplayer0/docker-net-dhcp:release-linux-amd64
Create the docker bridge dbrv100 attach it to our network bridge brv100
sudo docker network create -d ghcr.io/devplayer0/docker-net-dhcp:release-linux-amd64 --ipam-driver null -o bridge=brv100 dbrv100
Portainer
Make folder for Portainer
sudo mkdir -p /var/lib/libvirt/images/usb001/docker-storage/portainer
cd /var/lib/libvirt/images/usb001/docker-storage/portainer
vi docker-compose.yml
docker-compose.yml
# Portainer docker-compose.yml
version: '3.9'
services:
portainer:
container_name: portainer
hostname: portainer
image: portainer/portainer-ce:latest
restart: "no"
security_opt:
- no-new-privileges:true
volumes:
- /etc/localtime:/etc/localtime:ro
- /var/run/docker.sock:/var/run/docker.sock:ro
- /var/lib/libvirt/images/usb001/docker-storage/portainer/portainer-data:/data
ports:
- "8000:8000"
- "9443:9443"
mac_address: de:ad:be:ef:00:01
networks:
- dhcp
networks:
dhcp:
name: dbrv100
external: true
Bring the portainer docker up.
sudo docker compose up
Update
docker stop portainer
docker rm portainer
docker pull portainer/portainer-ce:latest
docker compose up -d
Portainer Password Reset If Forgot
docker container stop portainer
docker run --rm -v /var/lib/libvirt/images/usb001/docker-storage/portainer/portainer-data:/data portainer/helper-reset-password
time="2022-12-23T20:40:33Z" level=info msg="Loading PortainerDB: portainer.db"
time="2022-12-23T20:40:33Z" level=info msg="Opened existing store" version=72
2022/12/23 20:40:34 Password succesfully updated for user: nonasuomy
2022/12/23 20:40:34 Use the following password to login: SomeRandomGenPassword
docker container start portainer
WatchTower
Make folder for WatchTower
sudo mkdir -p /var/lib/libvirt/images/usb001/docker-storage/watchtower
cd /var/lib/libvirt/images/usb001/docker-storage/watchtower
vi docker-compose.yml
docker-compose.yml
# WatchTower Container for Docker https://github.com/containrrr/watchtower
version: "3.9"
services:
watchtower:
container_name: watchtower
hostname: watchtower
image: containrrr/watchtower
restart: "no"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
mac_address: de:ad:be:ef:00:02
networks:
- dhcp
networks:
dhcp:
name: dbrv100
external: true
Bring the portainer docker up.
sudo docker compose up
Mosquitto
Make folder for Mosquitto
sudo mkdir -p /var/lib/libvirt/images/usb001/docker-storage/mosquitto
cd /var/lib/libvirt/images/usb001/docker-storage/mosquitto
vi docker-compose.yml
docker-compose.yml
# Mosquitto Container for Docker
version: '3.9'
services:
eclipse-mosquitto:
container_name: mosquitto
restart: "no"
ports:
- 1883:1883
- 9001:9001
volumes:
- /var/lib/libvirt/images/usb001/docker-storage/mosquitto/config:/mosquitto/config
- /var/lib/libvirt/images/usb001/docker-storage/mosquitto/data:/mosquitto/data
- /var/lib/libvirt/images/usb001/docker-storage/mosquitto/log:/mosquitto/log
image: eclipse-mosquitto
mac_address: de:ad:be:ef:00:03
networks:
- dhcp
networks:
dhcp:
name: dbrv700
external: true
Bring the portainer docker up.
sudo docker compose up
Cloudflared
Make folder for Cloudflared
sudo mkdir -p /var/lib/libvirt/images/usb001/docker-storage/cloudflared
cd /var/lib/libvirt/images/usb001/docker-storage/cloudflared
vi docker-compose.yml
docker-compose.yml
# Cloudflared Container for Docker
version: "3.9"
services:
cloudflared:
container_name: cloudflared
image: "cloudflare/cloudflared:latest"
volumes:
- /var/lib/libvirt/images/usb001/docker-storage/cloudflared:/etc/cloudflared
mac_address: de:ad:be:ef:00:04
networks:
- dhcp
restart: "no"
privileged: true
command: tunnel run
environment:
- TUNNEL_TOKEN=YOURTUNNELTOKEN
networks:
dhcp:
name: dbrv100
external: true
Bring the Cloudflared container up.
sudo docker compose up
Frigate
Make folder for Frigate
sudo mkdir -p /var/lib/libvirt/images/usb001/docker-storage/frigate
cd /var/lib/libvirt/images/usb001/docker-storage/frigate
vi docker-compose.yml
docker-compose.yml
# Frigate Container for Docker
version: "3.9"
services:
frigate:
container_name: frigate
privileged: true
restart: "no"
image: blakeblackshear/frigate:stable-amd64
shm_size: "64mb"
devices:
- /dev/bus/usb:/dev/bus/usb # passes the USB Coral, needs to be modified for other versions
- /dev/apex_0:/dev/apex_0 # passes a PCIe Coral, follow driver instructions here https://coral.ai/docs/m2/get-started/#2a-on-linux
- /dev/dri/renderD128 # for intel hwaccel, needs to be updated for your hardware
volumes:
- /var/lib/libvirt/images/usb001/docker-storage/frigate/config/config.yml:/config/config.yml:ro
- /var/lib/libvirt/images/usb001/docker-storage/frigate:/media/frigate
- /var/lib/libvirt/images/usb001/docker-storage/frigate:/db
- type: tmpfs # Optional: 1GB of memory, reduces SSD/SD Card wear
target: /tmp/cache
tmpfs:
size: 1000000000
mac_address: de:ad:be:ef:00:05
networks:
- dhcp
ports:
- "5000:5000"
- "1935:1935" # RTMP feeds
environment:
FRIGATE_RTSP_PASSWORD: "somepassword"
networks:
dhcp:
name: dbrv100
external: true
Bring the Frigate container up.
sudo docker compose up
ESPHome
Make folder for ESPHome
sudo mkdir -p /var/lib/libvirt/images/usb001/docker-storage/esphome
cd /var/lib/libvirt/images/usb001/docker-storage/esphome
vi docker-compose.yml
docker-compose.yml
version: "3.9"
services:
esphome:
container_name: esphome
image: esphome/esphome
restart: "no"
volumes:
- /var/lib/libvirt/images/usb001/docker-storage/esphome/config:/config
- /etc/localtime:/etc/localtime:ro
environment:
- ESPHOME_DASHBOARD_USE_PING=true
mac_address: de:ad:be:ef:00:06
networks:
- dhcp
privileged: true
networks:
dhcp:
name: dbrv100
external: true
Bring the ESPHome container up.
sudo docker compose up
LMS
Make folder for LMS
sudo mkdir -p /var/lib/libvirt/images/usb001/docker-storage/lms
cd /var/lib/libvirt/images/usb001/docker-storage/lms
vi docker-compose.yml
docker-compose.yml
# Logitech Media Server Container for Docker
version: "3.9"
services:
logitech-media-server:
container_name: lms
hostname: lms-docker
image: lmscommunity/logitechmediaserver:latest
restart: "no"
ports:
- "9000:9000"
- "9090:9090"
- "3483:3483"
- "3483:3483/udp"
volumes:
# Folder where LMS stores its data (cache, logs, prefs)
- /var/lib/libvirt/images/usb001/docker-storage/lms/config:/config
# Folder where LMS should look for music
- /var/lib/libvirt/images/usb001/audio/music:/music
# use time of host
- /etc/localtime:/etc/localtime:ro
mac_address: de:ad:be:ef:00:07
networks:
- dhcp
environment:
- PUID=1000
- PGID=1003
networks:
dhcp:
name: dbrv100
external: true
Bring the LMS container up.
sudo docker compose up
HomeAssistant
Make folder for HomeAssistant
sudo mkdir -p /var/lib/libvirt/images/usb001/docker-storage/homeassistant
cd /var/lib/libvirt/images/usb001/docker-storage/homeassistant
vi docker-compose.yml
docker-compose.yml
#HomeAssistant Container for Docker
version: "3.9"
services:
homeassistant:
container_name: homeassistant
image: "ghcr.io/home-assistant/home-assistant:stable"
volumes:
- /var/lib/libvirt/images/usb001/docker-storage/homeassistant/config:/config
- /etc/localtime:/etc/localtime:ro
mac_address: de:ad:be:ef:00:08
networks:
- dhcp
devices:
- /dev/ttyACM0:/dev/ttyACM0
restart: "no"
privileged: true
networks:
dhcp:
name: dbrv100
external: true
Bring the HomeAssistant container up.
sudo docker compose up
rtlamr2mqtt Container
version: "3"
services:
rtlamr:
container_name: "rtlamr2mqtt"
image: "allangood/rtlamr2mqtt"
labels:
- "com.centurylinklabs.watchtower.enable=true"
- "com.centurylinklabs.watchtower.monitor-only=false"
restart: "no"
devices:
- /dev/bus/usb
volumes:
- /var/lib/libvirt/images/usb001/docker-storage/rtlamr2mqtt/rtlamr2mqtt.yaml:/etc/rtlamr2mqtt.yaml
- /var/lib/libvirt/images/usb001/docker-storage/rtlamr2mqtt/data:/var/lib/rtlamr2mqtt
mac_address: "de:ad:be:ef:00:09"
networks:
- dhcp
networks:
dhcp:
name: "dbrv700"
external: true
/var/lib/libvirt/images/usb001/docker-storage/rtlamr2mqtt/rtlamr2mqtt.yaml
# -- Configuration file starts here --
# (Optional section)
general:
# Sleep for this amount of seconds after one successful reading of every meter
# This parameter is helpful to keep CPU usage low and the temperature low as well
# Set this to 0 (default) to disable it
sleep_for: 300
# Set the verbosity level. It can be debug or info
verbosity: debug
# Enable/disable the tickle_rtl_tcp. This is used to "shake" rtl_tcp to wake it up.
# For me, this started to cause the rtl_tcp to refuse connections and miss the readings.
# This may help with a remote rtl_tcp server.
tickle_rtl_tcp: false
# (Optional) USB Device ID. Use lsusb to get the device ID
# Use "single" (default) if you have only one device
# device_id: 'single'
device_id: '0bda:2838'
# MQTT configuration.
mqtt:
# Whether to use Home Assistant auto-discovery feature or not
ha_autodiscovery: true
# Home Assistant auto-discovery topic
ha_autodiscovery_topic: homeassistant
# Base topic to send status and updates
base_topic: rtlamr
# By default, leaving host, port, user, and password unset will tell
# rtlamr2mqtt to use the default home assistant mqtt settings for those
# options. If needed, you can override these default settings:
# MQTT host name or IP address.
host: 10.0.10.60
# MQTT port.
port: 1883
# TLS Enabled? (False by default)
tls_enabled: false
# TLS CA certificate (mandatory if tls_enabled = true)
tls_ca: "/etc/ssl/certs/ca-certificates.crt"
# TLS server certificate (optional)
tls_cert: "/etc/ssl/my_server_cert.crt"
# TLS self-signed certificate/insecure certificate (optional, default true)
tls_insecure: true
# MQTT user name if you have, remove if you don't use authentication
user: SomeHASSUsername
# MQTT user password if you use one, remove if you don't use authentication
password: SomeMQTTPassword
# (Optional)
# This entire section is optional.
# If you don't need any custom parameter, don't use it.
# ***DO NOT ADD -msgtype, -filterid nor -protocol parameters here***
# -d parameter is not necessary anymore if you use device_id
custom_parameters:
# Documentation for rtl_tcp: https://osmocom.org/projects/rtl-sdr/wiki/Rtl-sdr
rtltcp: "-s 2048000"
# Documentation for rtlamr: https://github.com/bemasher/rtlamr/wiki/Configuration
# If you want to disable the local rtl_tcp and use an external/remote one, you must add "-server=remote-ip-address:po> rtlamr: "-unique=true -symbollength=32"
# (Required section)
# Here is the place to define your meters
meters:
# The ID of your meter
- id: XXXXXXXX
# The protocol
protocol: scm+
# A nice name to show on your Home Assistant/Node Red
name: meter_water
# (optional) A number format to be used for your meter
format: "#####.#"
# (optional) A measurement unit to be used by Home Assistant
# Typical values are ft³ and m³ (use the superscript) for water/gas meters
# and kWh or Wh for electric meters
unit_of_measurement: "m³"
#"\u33A5"
# (optional) An icon to be used by Home Assistant
icon: mdi:gauge
# A device_class to define what the sensor is measuring for use in the Energy panel
# Typical values are "gas" or "energy". Default is blank.
device_class: water
# "total_increasing" for most meters, "total" for meters that might go
# backwards (net energy meters). Defaults to "total_increasing" if unset.
state_class: total_increasing
#- id: XXXXXXX
# protocol: scm
# name: meter_hydro
# unit_of_measurement: kWh
# device_class: energy
# -- End of configuration file --
Rhasspy Container
You can ignore this container and use the new Wyoming Protocol Piper / Faster-Whisper below.
# Rhasspy Container for Docker
version: "3.9"
services:
rhasspy:
image: rhasspy/rhasspy:latest
labels:
- "com.centurylinklabs.watchtower.enable=true"
- "com.centurylinklabs.watchtower.monitor-only=false"
container_name: rhasspy
volumes:
- /etc/localtime:/etc/localtime:ro
- /var/lib/libvirt/images/usb001/docker-storage/rhasspy/profiles:/profiles
- /etc/asound.conf:/etc/asound.conf:ro
mac_address: "de:ad:be:ef:00:32"
networks:
- dhcp
devices:
- /dev/snd:/dev/snd
ports:
- 12101:12101 # http
- 12183:12183 # mqtt
command: --profile en --user-profiles /profiles
restart: "no"
networks:
dhcp:
name: "dbrv100"
Go to the IP of Rhasspy in browser: http://
Settings
MQTT: Internal
Audio Recording: PyAudio (Recommended)
Device: 3
HDA Intel PCH: ALC3226 Analog (hw:1,0)* (3)
Wake Word: Porcupine (Recommended)
Available Keyword: terminator
Speech to Text: Kaldi (Recommended)
Intent Recognition: Fsticuffs (Recommended)
Text to Speech: NanoTTS (Recommended)
Audio Playing: aplay (Recommended)
Device: plughw:CARD=PCH,DEV=0
Available Devices: Hardware device with all software conversions (plughw:CARD=PCH,DEV=0)
Dialogue Management: Rhasspy (Recommended)
Intent Handling: Home Assistant
Hass URL: http://
Access Token: User Profile Persistant Token
Save Settings
Testing Sound In Docker Container
aplay -L for a list of devices
aplay -L
null
Discard all samples (playback) or generate zero samples (capture)
jack
JACK Audio Connection Kit
pulse
PulseAudio Sound Server
default
Default Audio Device
hdmi:CARD=HDMI,DEV=0
HDA Intel HDMI, HDMI 0
HDMI Audio Output
hdmi:CARD=HDMI,DEV=1
HDA Intel HDMI, HDMI 1
HDMI Audio Output
hdmi:CARD=HDMI,DEV=2
HDA Intel HDMI, HDMI 2
HDMI Audio Output
dmix:CARD=HDMI,DEV=3
HDA Intel HDMI, HDMI 0
Direct sample mixing device
dmix:CARD=HDMI,DEV=7
HDA Intel HDMI, HDMI 1
Direct sample mixing device
dmix:CARD=HDMI,DEV=8
HDA Intel HDMI, HDMI 2
Direct sample mixing device
dsnoop:CARD=HDMI,DEV=3
HDA Intel HDMI, HDMI 0
Direct sample snooping device
dsnoop:CARD=HDMI,DEV=7
HDA Intel HDMI, HDMI 1
Direct sample snooping device
dsnoop:CARD=HDMI,DEV=8
HDA Intel HDMI, HDMI 2
Direct sample snooping device
hw:CARD=HDMI,DEV=3
HDA Intel HDMI, HDMI 0
Direct hardware device without any conversions
hw:CARD=HDMI,DEV=7
HDA Intel HDMI, HDMI 1
Direct hardware device without any conversions
hw:CARD=HDMI,DEV=8
HDA Intel HDMI, HDMI 2
Direct hardware device without any conversions
plughw:CARD=HDMI,DEV=3
HDA Intel HDMI, HDMI 0
Hardware device with all software conversions
plughw:CARD=HDMI,DEV=7
HDA Intel HDMI, HDMI 1
Hardware device with all software conversions
plughw:CARD=HDMI,DEV=8
HDA Intel HDMI, HDMI 2
Hardware device with all software conversions
usbstream:CARD=HDMI
HDA Intel HDMI
USB Stream Output
sysdefault:CARD=PCH
HDA Intel PCH, ALC3226 Analog
Default Audio Device
front:CARD=PCH,DEV=0
HDA Intel PCH, ALC3226 Analog
Front speakers
surround21:CARD=PCH,DEV=0
HDA Intel PCH, ALC3226 Analog
2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=PCH,DEV=0
HDA Intel PCH, ALC3226 Analog
4.0 Surround output to Front and Rear speakers
surround41:CARD=PCH,DEV=0
HDA Intel PCH, ALC3226 Analog
4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=PCH,DEV=0
HDA Intel PCH, ALC3226 Analog
5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=PCH,DEV=0
HDA Intel PCH, ALC3226 Analog
5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=PCH,DEV=0
HDA Intel PCH, ALC3226 Analog
7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
dmix:CARD=PCH,DEV=0
HDA Intel PCH, ALC3226 Analog
Direct sample mixing device
dsnoop:CARD=PCH,DEV=0
HDA Intel PCH, ALC3226 Analog
Direct sample snooping device
hw:CARD=PCH,DEV=0
HDA Intel PCH, ALC3226 Analog
Direct hardware device without any conversions
plughw:CARD=PCH,DEV=0
HDA Intel PCH, ALC3226 Analog
Hardware device with all software conversions
usbstream:CARD=PCH
HDA Intel PCH
USB Stream Output
Find which one it was in this case plughw:CARD=PCH,DEV=0
Test with
aplay -D plughw:1,0 /usr/share/sounds/alsa/Front_Right.wav
or
speaker-test -D plughw:1,0
Record Test
arecord -D plughw:1,0 -d 10 test.wav
Make the browser microphone work with non https local sources.
chrome://flags/#unsafely-treat-insecure-origin-as-secure
Enable the Insecure origins treated as secure
Add the address for your Rhasspy server that you want to ignore the secure origin policy for. Remember to include the port number too.
Save and restart Chrome.
Update the container
Error: “Archive directory /var/cache/apt/amd64/archives/partial is missing.”
mkdir -P /var/cache/apt/amd64/archives/partial
apt clean
Updates
apt update
apt upgrade
apt dist-upgrade
Faster-Whisper Container
# docker run -it -p 10300:10300 -v /path/to/local/data:/data rhasspy/wyoming-whisper --model tiny-int8 --language en
# Whisper Container for Docker
version: "3.9"
services:
wyoming-whisper:
image: rhasspy/wyoming-whisper:latest
labels:
- "com.centurylinklabs.watchtower.enable=true"
- "com.centurylinklabs.watchtower.monitor-only=false"
container_name: whisper
volumes:
- /etc/localtime:/etc/localtime:ro
- /var/lib/libvirt/images/usb001/docker-storage/wyoming-whisper/data:/data
#- /etc/asound.conf:/etc/asound.conf
mac_address: "de:ad:be:ef:5e:34"
networks:
- dhcp
devices:
- /dev/snd:/dev/snd
ports:
- 10300:10300 # http
command: --model tiny-int8 --language en
restart: "no"
networks:
dhcp:
name: "dbrv100"
Piper Container
# docker run -it -p 10200:10200 -v /path/to/local/data:/data rhasspy/wyoming-piper --voice en-us-lessac-low
# Piper Container for Docker
version: "3.9"
services:
wyoming-piper:
image: rhasspy/wyoming-piper:latest
labels:
- "com.centurylinklabs.watchtower.enable=true"
- "com.centurylinklabs.watchtower.monitor-only=false"
container_name: piper
volumes:
- /etc/localtime:/etc/localtime:ro
- /var/lib/libvirt/images/usb001/docker-storage/wyoming-piper/data:/data
mac_address: "de:ad:be:ef:5e:35"
networks:
- dhcp
ports:
- 10200:10200 # http
command: --voice en-us-lessac-low
restart: "no"
networks:
dhcp:
name: "dbrv100"
In the Wyoming protocol integration enter the IP and Port of the two whisper/piper dockers so 10200 and 10300 and their corresponding IP.
Then go under the settings -> voice assistant -> add assistant.
Then drop down the boxes for faster-whisper and piper.
Wyoming-OpenWakeWord Container
# Wyoming-OpenWakeWord Container for Docker
version: "3.9"
services:
wyomingopenwakeword:
container_name: "wyoming-openwakeword"
image: "rhasspy/wyoming-openwakeword:latest"
labels:
- "com.centurylinklabs.watchtower.enable=true"
- "com.centurylinklabs.watchtower.monitor-only=false"
volumes:
- /etc/localtime:/etc/localtime:ro
- /var/lib/libvirt/images/usb001/docker-storage/wyoming-openwakeword/data:/data
mac_address: "de:ad:be:ef:5e:36"
hostname: "wyomingopenwakeword"
networks:
- dhcp
ports:
- 10400:10400
devices:
- /dev/snd:/dev/snd
command: --model 'ok_nabu' --model 'hey_jarvis' --model 'hey_rhasspy' --model 'hey_mycroft' --model 'alexa' --preload-model 'ok_nabu'
# --uri 'tcp://0.0.0.0:10400'
restart: "no"
#restart: unless-stopped
#privileged: true
#network_mode: host
networks:
dhcp:
name: "dbrv100"
external: true
Wire-Pod / Vector
I was having issues with a dockerhub version of Wire-Pod because avahi-daemon required dbus and I can’t use dbus in docker on my system without some extra changes. I found out you can disable dbus for avahi. I modified it like this (Basically avahi-daemon doesn’t broadcast the server name that Vector is looking for to start the pairing process from https://keriganc.com/vector-wirepod-setup/html/main.html)
This may be only an issue with my complex docker network setup.
If the above works fine for you good stuff but also if you just want to build the docker yourself without depending on someone else’s stuff (Security etc) you can use this too.
dockerfile
FROM ubuntu:latest
# Edit your timezone here:
ENV TZ=Europe/London
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN apt-get update \
&& apt-get install -y sudo
RUN sudo apt-get -y install avahi-daemon
RUN sudo sed -i '/#enable-dbus=yes/s/^#//g' /etc/avahi/avahi-daemon.conf
RUN sudo sed -i '/^enable-dbus/s/yes/no/' /etc/avahi/avahi-daemon.conf
RUN adduser --disabled-password --gecos '' wirepod
RUN adduser wirepod sudo
RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
USER wirepod
RUN sudo apt-get update && sudo apt-get install -y git
RUN sudo mkdir /wire-pod
RUN sudo chown -R wirepod:wirepod /wire-pod
RUN cd /wire-pod
RUN git clone https://github.com/kercre123/wire-pod/ wire-pod
WORKDIR /wire-pod
RUN sudo STT=vosk /wire-pod/setup.sh
RUN sudo service avahi-daemon start
WORKDIR /wire-pod/chipper
CMD sudo /wire-pod/chipper/start.sh
Compile the dockerfile image
sudo docker build -t wire-pod .
Building image should look something like this
[+] Building 1.9s (22/22) FINISHED docker:default
=> [internal] load build definition from dockerfile 0.0s
=> => transferring dockerfile: 906B 0.0s
=> [internal] load metadata for docker.io/library/ubuntu:latest 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [ 1/18] FROM docker.io/library/ubuntu:latest 0.0s
=> CACHED [ 2/18] RUN ln -snf /usr/share/zoneinfo/Europe/London /etc/localtime && echo Europe/London > /etc/ 0.0s
=> CACHED [ 3/18] RUN apt-get update && apt-get install -y sudo 0.0s
=> CACHED [ 4/18] RUN sudo apt-get -y install avahi-daemon 0.0s
=> CACHED [ 5/18] RUN sudo sed -i '/#enable-dbus=yes/s/^#//g' /etc/avahi/avahi-daemon.conf 0.0s
=> CACHED [ 6/18] RUN sudo sed -i '/^enable-dbus/s/yes/no/' /etc/avahi/avahi-daemon.conf 0.0s
=> CACHED [ 7/18] RUN adduser --disabled-password --gecos '' wirepod 0.0s
=> CACHED [ 8/18] RUN adduser wirepod sudo 0.0s
=> CACHED [ 9/18] RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers 0.0s
=> CACHED [10/18] RUN sudo apt-get update && sudo apt-get install -y git 0.0s
=> CACHED [11/18] RUN sudo mkdir /wire-pod 0.0s
=> CACHED [12/18] RUN sudo chown -R wirepod:wirepod /wire-pod 0.0s
=> CACHED [13/18] RUN cd /wire-pod 0.0s
=> CACHED [14/18] RUN git clone https://github.com/kercre123/wire-pod/ wire-pod 0.0s
=> CACHED [15/18] WORKDIR /wire-pod 0.0s
=> CACHED [16/18] RUN sudo STT=vosk /wire-pod/setup.sh 0.0s
=> [17/18] RUN sudo service avahi-daemon start 0.3s
=> [18/18] WORKDIR /wire-pod/chipper 0.3s
=> exporting to image 1.3s
=> => exporting layers 1.3s
=> => writing image sha256:<key> 0.0s
=> => naming to docker.io/library/wire-pod 0.0s
Note: I use a docker plugin called docker-net-dhcp so I can drop dockers on different VLANs with a specific MAC address so DNSMasq can dish out static IP’s to them over DHCP. Specifically in this case it dumps this wire-pod server on my wifi network VLAN so Vector can talk to it.
If you want to set that plugin up with VLANs it looks like this but you can probably skip this part to the compose section below:
Primary WiFi VLAN 42 setup
sudo nano /etc/systemd/network/eno1.42.netdev
[NetDev]
Name=eno1.42
Kind=vlan
[VLAN]
Id=42
eno1.42.network
sudo nano /etc/systemd/network/eno1.42.network
[Match]
Name=eno1.42
[Network]
Bridge=brv42
brv42.netdev
sudo nano /etc/systemd/network/brv42.netdev
[NetDev]
Name=brv42
Kind=bridge
brv42.network
sudo nano /etc/systemd/network/brv42.network
[Match]
Name=brv42
[Network]
/etc/dnsmasq.conf
# VLAN 42 Primary WiFi
interface=enp12s0
# VLAN 42 Primary WiFi
dhcp-range=enp12s0,10.13.37.50,10.13.37.200,12h
# WiFi Primary VLAN 42
# WirePod (Vector)
dhcp-host=9e:de:ad:be:ef:42,10.13.37.42
# Vector
dhcp-host=9e:de:ad:be:ef:69,10.13.37.240
Install DHCP Plugin
docker plugin install ghcr.io/devplayer0/docker-net-dhcp:release-linux-amd64
Create the docker bridge dbrv42 and attach it to our network bridge brv42
sudo docker network create -d ghcr.io/devplayer0/docker-net-dhcp:release-linux-amd64 --ipam-driver null -o bridge=brv42 dbrv42
The commented-out stuff is not required basically watchtower updates and docker-net-dhcp stuff.
docker-compose.yml
# Wire-Pod Container for Docker
# https://github.com/kercre123/wire-pod/wiki/Installation
version: "3.9"
services:
wirepod:
container_name: "wirepod"
image: "wire-pod:latest"
#labels:
# - "com.centurylinklabs.watchtower.enable=true"
# - "com.centurylinklabs.watchtower.monitor-only=false"
volumes:
- /var/lib/libvirt/images/usb001/docker-storage/wirepod/data:/data
# - /run/dbus:/run/dbus:ro # This should technically get dbus running for Avahi but didn't seem to work for me.
# May have to use dbus-broker instead of dbus-daemon.
mac_address: "9e:de:ad:be:ef:42"
hostname: escapepod
#networks:
# - dhcp
ports:
- 80:80
- 8080:8080
- 443:433
- 8084:8084
restart: "no" # Turn this to unless-stopped if you think everything is ok
# If you use docker-net-dhcp like me keep this set to no so your dockerd doesn't hang on boot.
#networks:
# dhcp:
# name: "dbrv42"
# external: true
Compose the docker container
docker compose up # use -d to launch it in the background I usually do this after I see it did everything ok.
Compose should look something like this
docker compose up
[+] Running 1/1
✔ Container wirepod Recreated 0.3s
Attaching to wirepod
wirepod | go: downloading github.com/digital-dream-labs/api v0.0.0-20210824232136-8cc90c1bb12c
wirepod | go: downloading github.com/digital-dream-labs/hugh v0.0.0-20210210154335-f4159b9fcd5f
wirepod | go: downloading github.com/soheilhy/cmux v0.1.5
wirepod | go: downloading github.com/grpc-ecosystem/go-grpc-middleware v1.3.0
wirepod | go: downloading github.com/grpc-ecosystem/grpc-gateway/v2 v2.15.0
wirepod | go: downloading google.golang.org/grpc v1.51.0
wirepod | go: downloading google.golang.org/protobuf v1.28.1
wirepod | go: downloading github.com/digital-dream-labs/opus-go v0.0.0-20201230195736-934a8a9e0a1e
wirepod | go: downloading github.com/maxhawkins/go-webrtcvad v0.0.0-20210121163624-be60036f3083
wirepod | go: downloading github.com/sirupsen/logrus v1.9.0
wirepod | go: downloading gopkg.in/alecthomas/kingpin.v2 v2.2.6
wirepod | go: downloading gopkg.in/ini.v1 v1.67.0
wirepod | go: downloading github.com/golang-jwt/jwt v3.2.2+incompatible
wirepod | go: downloading github.com/google/uuid v1.3.0
wirepod | go: downloading github.com/pkg/errors v0.9.1
wirepod | go: downloading github.com/soundhound/houndify-sdk-go v0.3.5
wirepod | go: downloading github.com/fforchino/vector-go-sdk v0.0.0-20221216080054-dfe1a258d335
wirepod | go: downloading github.com/bramvdbogaerde/go-scp v1.2.1
wirepod | go: downloading golang.org/x/crypto v0.5.0
wirepod | go: downloading github.com/golang/protobuf v1.5.2
wirepod | go: downloading google.golang.org/genproto v0.0.0-20221227171554-f9683d7f8bef
wirepod | go: downloading golang.org/x/net v0.5.0
wirepod | go: downloading github.com/spf13/viper v1.14.0
wirepod | go: downloading gopkg.in/hraban/opus.v2 v2.0.0-20220302220929-eeacdbcb92d0
wirepod | go: downloading golang.org/x/sys v0.4.0
wirepod | go: downloading github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751
wirepod | go: downloading github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137
wirepod | go: downloading github.com/fsnotify/fsnotify v1.6.0
wirepod | go: downloading github.com/mitchellh/mapstructure v1.5.0
wirepod | go: downloading github.com/spf13/afero v1.9.3
wirepod | go: downloading github.com/spf13/cast v1.5.0
wirepod | go: downloading github.com/spf13/jwalterweatherman v1.1.0
wirepod | go: downloading github.com/spf13/pflag v1.0.5
wirepod | go: downloading github.com/grd/ogg v0.0.0-20130623210630-0dae53159b70
wirepod | go: downloading github.com/subosito/gotenv v1.4.1
wirepod | go: downloading github.com/hashicorp/hcl v1.0.0
wirepod | go: downloading github.com/magiconair/properties v1.8.7
wirepod | go: downloading github.com/pelletier/go-toml/v2 v2.0.6
wirepod | go: downloading gopkg.in/yaml.v3 v3.0.1
wirepod | go: downloading golang.org/x/text v0.6.0
wirepod | go: downloading github.com/pelletier/go-toml v1.9.5
wirepod | Initializing variables
wirepod | Unsupported path scenario, printing podPathSplit:
wirepod | [ wire-pod chipper]
wirepod | SDK info path: /tmp/.anki_vector/
wirepod | API config JSON created
wirepod | open ../vosk/models/: no such file or directory
wirepod | Initiating vosk voice processor with language
wirepod | Loading plugins
wirepod | Wire-pod is not setup. Use the webserver at port 8080 to set up wire-pod.
wirepod | Starting webserver at port 8080 (http://localhost:8080)
wirepod | Starting SDK app
wirepod | Starting server at port 80 for connCheck
wirepod | Configuration page: http://10.13.37.42:8080