====== Docker install on the Raspberry Pi 4 ======
The default ''docker.io'' package in Debian 10 (buster) is broken. I used puppet and the puppetlabs-docker module to install the testing version of ''docker-ce''. I then configured the Plex Media Server as a docker container also using puppet.
1. Run the following commands as root to install ''puppet''
# wget http://apt.puppet.com/puppet5-release-$(lsb_release -sc).deb
# dpkg -i puppet5-release-$(lsb_release -sc).deb
# apt update
# apt install puppet
2. Install the ''puppetlabs-docker'' module
# puppet module install puppetlabs-docker
3. Create a puppet manifest
The ''test'' channel is used because a ''stable'' package for the armv7l architecture didn't exist yet
''docker.pp''
class { 'docker':
docker_ce_channel => 'test'
}
4. Apply the ''docker.pp'' puppet manifest to install and configure docker
# puppet apply --test docker.pp
5. Example: install and run the ''linuxserver/plex'' container by appending to the ''docker.pp'' file and applying the declarative manifest.
''docker.pp''
docker::run { 'plex':
image => 'linuxserver/plex',
net => 'host',
env => [
"PUID=1000",
"PGID=1000",
"VERSION=docker",
],
volumes => [
"/var/lib/plex/config:/config",
"/data/tv:/tv",
"/data/movies:/movies",
],
}
Create the directories and set the owner to match the UID of the container
# mkdir -p /var/lib/plex/config /data/tv /data/movies
# chown -R 1000:1000 /var/lib/plex/config /data/tv /data/movies
# puppet apply --test docker.pp
6. You can then browse to the Plex webUI at http://raspberry.pi.ip.address:32400