zorruno wikki: Docker Notes

Docker Notes


Mosquitto

Raspberry Pi
docker run -d -p 1883:1883 -p 9001:9001 pascaldevink/rpi-mosquitto 

x86
docker run -p 1883:1883 --name mosquitto -d ansi/mosquitto


docker-compose (x86)
version: 3
services:
	mosquitto:
		ports:
			- '1883:1883'
		container_name: mosquitto
		restart: unless-stopped
		image: ansi/mosquitto


Home Assistant

Raspberry Pi
docker run -d --name="home-assistant" -v /homeassistant:/config -v /etc/localtime:/etc/localtime:ro --net=host blakeblackshear/rpi-home-assistant:0.36.1

x86
sudo docker run -d --name="home-assistant" -v /dockervolumes/homeassistant:/config -v /etc/localtime:/etc/localtime:ro --net=host homeassistant/home-assistant

docker-compose (x86)
version: '2'
services:
	home-assistant:
		container_name: home-assistant
		network_mode: host
		volumes:
			- '/dockervolumes/homeassistant:/config'
			- '/etc/localtime:/etc/localtime:ro'
		restart: unless-stopped
		image: homeassistant/home-assistant



Node Red

docker run -it -p 1880:1880 --name mynodered nodered/node-red-docker

docker-compose
version: 3
services:
	node-red-docker:
		ports:
			- '1880:1880'
		container_name: mynodered
		restart: unless-stopped
		image: nodered/node-red-docker


Plex Server


docker create \
--name=plex \
--net=host \
-e VERSION=latest \
-e PUID=1000 -e PGID=1000 \
-e TZ=Pacific/Auckland \
-v /dockervolumes/database:/config \
-v /dockervolumes/tvshows:/data/tvshows \
-v /dockervolumes/movies:/data/movies \
-v /dockervolumes/transcode:/transcode \
linuxserver/plex


Mopidy

(not yet working successfully)
https://hub.docker.com/r/whhoesj/mopidy/

x86
docker run -d \
	  -e "PULSE_SERVER=tcp:$(hostname -i):4713" \
	  -e "PULSE_COOKIE_DATA=$(pax11publish -d | grep --color=never -Po '(?<=^Cookie: ).*')" \
	  -v "$PWD/media:/var/lib/mopidy/media:ro" \
	  -v "$PWD/local:/var/lib/mopidy/local" \
	  -p 6600:6600 -p 6680:6680 \
	  wernight/mopidy \
	  mopidy \
	  -o spotify/username=USERNAME -o spotify/password=PASSWORD



docker build -t rawdlite/mopidy . 


docker run -d  --name mopidy --net host --device /dev/snd  \
	-v ~/.config/mopidy/mopidy.conf:/root/.config/mopidy/mopidy.conf  \
	-v /data/music:/data/music rawdlite/mopidy 


Mopidy
docker run --device /dev/snd -p 6680:6680 --restart=unless-stopped --detach=true -t shaunmulligan/rpi3-jessie-mopidy 


Get pi user docker perms
sudo usermod -aG docker pi 


Commands
kill them all:
sudo docker rm -f $(sudo docker ps -a -q)

What exists:
sudo docker ps -a

Delete an Image: 
$ docker inspect --format="{{.Id}}" evil_swartz
756535dc6e9ab9b560f84c85063f55952273a23192641fc2756aa9721d9d1000


full inspection as root
docker inspect -f "{{.Path}} {{.Args}} ({{.Id}})" $(docker ps -a -q)


Convert docker run commands to docker-compose files
https://composerize.com/

--
CategoryDocker
CategoryMicrocontrol
CategoryHomeAutomation
CategoryRaspberryPi
CategoryLinux
There are no comments on this page.