From 69cab1e6bb008b223f8d15015757ca9e705bda9b Mon Sep 17 00:00:00 2001 From: Blake Blackshear Date: Sat, 13 Feb 2021 06:52:14 -0600 Subject: [PATCH] update docker commands to avoid privileged mode --- docs/docs/installation.md | 40 +++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/docs/docs/installation.md b/docs/docs/installation.md index 5f35121b3..6663f8e26 100644 --- a/docs/docs/installation.md +++ b/docs/docs/installation.md @@ -33,19 +33,19 @@ Make sure you choose the right image for your architecture: It is recommended to run with docker-compose: ```yaml -version: '3.6' +version: '3.9' services: frigate: container_name: frigate restart: unless-stopped - privileged: true - image: blakeblackshear/frigate:0.8.0-beta2-amd64 - volumes: + image: blakeblackshear/frigate: + devices: - /dev/bus/usb:/dev/bus/usb + - /dev/dri/renderD128 # for intel hwaccel, needs to be updated for your hardware + volumes: - /etc/localtime:/etc/localtime:ro - - :/config - - :/media/frigate/clips - - :/media/frigate/recordings + - :/config/config.yml:ro + - :/media/frigate - type: tmpfs # Optional: 1GB of memory, reduces SSD/SD Card wear target: /tmp/cache tmpfs: @@ -60,19 +60,19 @@ services: If you can't use docker compose, you can run the container with something similar to this: ```bash -docker run --rm \ ---name frigate \ ---privileged \ ---mount type=tmpfs,target=/tmp/cache,tmpfs-size=1000000000 \ --v /dev/bus/usb:/dev/bus/usb \ --v :/media/frigate/clips \ --v :/media/frigate/recordings \ --v :/config:ro \ --v /etc/localtime:/etc/localtime:ro \ --e FRIGATE_RTSP_PASSWORD='password' \ --p 5000:5000 \ --p 1935:1935 \ -blakeblackshear/frigate:0.8.0-beta2-amd64 +docker run -d \ + --name frigate \ + --restart=unless-stopped \ + --mount type=tmpfs,target=/tmp/cache,tmpfs-size=1000000000 \ + --device /dev/bus/usb:/dev/bus/usb \ + --device /dev/dri/renderD128 + -v :/media/frigate \ + -v :/config/config.yml:ro \ + -v /etc/localtime:/etc/localtime:ro \ + -e FRIGATE_RTSP_PASSWORD='password' \ + -p 5000:5000 \ + -p 1935:1935 \ + blakeblackshear/frigate: ``` ### Calculating shm-size