Install Docker On Proxmox

  1. Install Docker On Proxmox
  2. Install Docker On Proxmox 6
  3. Install Docker On Proxmox Lxc
  4. Install Docker On Proxmox
  1. How to install, register and start GitLab Runner on Windows. How to create and deploy a local Registry Server with Docker Image.
  2. Proxmox 7 is here and comes with a host of new features! In this video we’re cover all of the new features in Proxmox 7 as well as. Jul 10 2021-07-10T14:00:00-05:00 1 min.

Install Docker CE. Install the latest version of Docker-ce from the docker repository. Install the package dependencies for docker-ce. Yum install -y yum-utils device-mapper-persistent-data lvm2. Add the docker repository to the system and install docker-ce using the yum command.

3 min read

Proxmox is for running VMs. It offers support for Linux Containers, but there is no build in support for Docker containers. This does not mean that you cannot run Docker on Proxmox. You won’t get native integration into Proxmox, which means that you need to use a different software to manage your containers. If you still want to: one alternative is to install Docker in a VM (recommended by Proxmox). Another alternative is to install Docker directly on the server. As the used OS by Proxmox is Linux and Debian, this is really easy to do. Just follow the steps described at the Docker installation page for Debian. If you want to run Docker directly on the Proxmox host, it’s just 7 steps:

  1. Prepare apt

2. Install base software

3. Install Docker key

4. Check fingerprint

5. Add docker repository to apt

6. Update apt

7. Install Docker

Output

For those that want to know what the output of the above commands looks like I added some screenshots.

Docker
  1. Prepare apt
Install docker on proxmox 6

2. Install base software

[…]

3. Install Docker key

4. Check fingerprint

5. Add docker repository to apt

Install

6. Update apt

Now the docker repo is also loaded.

7. Install Docker

[…]

Frigate is a Docker container that can be run on any Docker host including as a HassOS Addon. See instructions below for installing the HassOS addon.

For Home Assistant users, there is also a custom component (aka integration). This custom component adds tighter integration with Home Assistant by automatically setting up camera entities, sensors, media browser for clips and recordings, and a public API to simplify notifications.

Note that HassOS Addons and custom components are different things. If you are already running Frigate with Docker directly, you do not need the Addon since the Addon would run another instance of Frigate.

HassOS Addon#

HassOS users can install via the addon repository. Frigate requires an MQTT server.

  1. Navigate to Supervisor > Add-on Store > Repositories
  2. Add https://github.com/blakeblackshear/frigate-hass-addons
  3. Setup your network configuration in the Configuration tab if deisred
  4. Create the file frigate.yml in your config directory with your detailed Frigate configuration
  5. Start the addon container
  6. If you are using hardware acceleration for ffmpeg, you will need to disable 'Protection mode'

Docker#

Make sure you choose the right image for your architecture:

ArchImage Name
amd64blakeblackshear/frigate:stable-amd64
amd64nvidiablakeblackshear/frigate:stable-amd64nvidia
armv7blakeblackshear/frigate:stable-armv7
aarch64blakeblackshear/frigate:stable-aarch64

Install Docker On Proxmox

It is recommended to run with docker-compose:

services:
container_name: frigate
privileged:true # this may not be necessary for all setups
image: blakeblackshear/frigate:<specify_version_tag>
- /dev/bus/usb:/dev/bus/usb
- /dev/dri/renderD128 # for intel hwaccel, needs to be updated for your hardware
- /etc/localtime:/etc/localtime:ro
- <path_to_directory_for_media>:/media/frigate
-type: tmpfs # Optional: 1GB of memory, reduces SSD/SD Card wear

Install Docker On Proxmox 6

tmpfs:
ports:
-'1935:1935'# RTMP feeds
FRIGATE_RTSP_PASSWORD:'password'

If you can't use docker compose, you can run the container with something similar to this:

--name frigate
--mount type=tmpfs,target=/tmp/cache,tmpfs-size=1000000000
--device /dev/dri/renderD128
-v <path_to_directory_for_media>:/media/frigate
-v /etc/localtime:/etc/localtime:ro
-p 5000:5000
Install docker on proxmox lxcInstall Docker On Proxmox
blakeblackshear/frigate:<specify_version_tag>

Calculating shm-size#

The default shm-size of 64m is fine for setups with 3 or less 1080p cameras. If frigate is exiting with 'Bus error' messages, it could be because you have too many high resolution cameras and you need to specify a higher shm size.

You can calculate the necessary shm-size for each camera with the following formula:

(width * height * 1.5 * 7 + 270480)/1048576 = <shm size in mb>

The shm size cannot be set per container for Home Assistant Addons. You must set default-shm-size in /etc/docker/daemon.json to increase the default shm size. This will increase the shm size for all of your docker containers. This may or may not cause issues with your setup. https://docs.docker.com/engine/reference/commandline/dockerd/#daemon-configuration-file

Kubernetes#

Use the helm chart.

Virtualization#

For ideal performance, Frigate needs access to underlying hardware for the Coral and GPU devices for ffmpeg decoding. Running Frigate in a VM on top of Proxmox, ESXi, Virtualbox, etc. is not recommended. The virtualization layer typically introduces a sizable amount of overhead for communication with Coral devices.

Install Docker On Proxmox Lxc

Proxmox#

Some people have had success running Frigate in LXC directly with the following config:

cores: 2

Install Docker On Proxmox

hostname: FrigateLXC
net0: name=eth0,bridge=vmbr0,firewall=1,hwaddr=2E:76:AE:5A:58:48,ip=dhcp,ip6=auto,type=veth
rootfs: local-lvm:vm-115-disk-0,size=12G
lxc.cgroup.devices.allow: c 189:385 rwm
lxc.mount.entry: /dev/dri/renderD128 dev/dri/renderD128 none bind,optional,create=file
lxc.mount.entry: /dev/bus/usb/004/002 dev/bus/usb/004/002 none bind,optional,create=file
lxc.cgroup.devices.allow: a

ESX#

For details on running Frigate under ESX, see details here.