Skip to content

Commit

Permalink
Initial commit of bluecherry-client docker scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
Curtis Hall committed Sep 6, 2020
1 parent ce92397 commit bae4430
Show file tree
Hide file tree
Showing 6 changed files with 762 additions and 2 deletions.
15 changes: 15 additions & 0 deletions client/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM ubuntu:18.04

RUN apt-get update \
&& apt-get install -y wget gnupg

COPY install-packages.sh .
RUN ./install-packages.sh

COPY bluecherry.conf /root/.config/bluecherry/

RUN export QT_GRAPHICSSYSTEM="native"

RUN export QT_X11_NO_MITSHM=1

CMD /usr/bin/bluecherry-client
674 changes: 674 additions & 0 deletions client/LICENSE

Large diffs are not rendered by default.

14 changes: 14 additions & 0 deletions client/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# bluecherry-client Docker

Docker recipe for Bluecherry-client. Based on the original work of staal0 - https://github.com/staal0/BluecherryClient-docker

Notes:

- This is based on Ubuntu 18.04 and installs the latest Bluecherry client (bluecherry-client) from Bluecherry servers.

Running the docker:


sudo docker build -t bluecherry-client .

sudo chmod +x run.sh ; ./run.sh
22 changes: 20 additions & 2 deletions client/bluecherry.conf
Original file line number Diff line number Diff line change
@@ -1,13 +1,27 @@
[cameraLayouts]
Default=@ByteArray(\xff\xff\xff\xff\0\0\0\x1\0\0\0\x1\0\0\0\x1\xff\xff\xff\xff)
Default=@ByteArray(\xff\xff\xff\xff\0\0\0\x1\0\0\0\x2\0\0\0\x2\0\0\0\0\0\0\0\x42\0\0\0\0\0\0\0\0\0\0\0\x43\0\0\0\0\0\0\0\0\0\0\0?\0\0\0\0\0\0\0\0\0\0\0:\0\0\0\0)
Demo=@ByteArray(\xff\xff\xff\xff\0\0\0\x1\0\0\0\x2\0\0\0\x2\0\0\0\0\0\0\0\x42\0\0\0\0\0\0\0\0\0\0\0\x43\0\0\0\0\0\0\0\0\0\0\0?\0\0\0\0\0\0\0\0\0\0\0:\0\0\0\0)

[ui]
topWindow=
main\geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x1\0\0\0\0\x1\x86\0\0\0\x88\0\0\x5\xe5\0\0\x3\x9f\0\0\x1\x90\0\0\0\xa8\0\0\x5\xdb\0\0\x3\x95\0\0\0\x1\0\0)
main\geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x1\0\0\0\0\x1|\0\0\0\x80\0\0\x5\xdb\0\0\x3\x97\0\0\x1\x86\0\0\0\xa0\0\0\x5\xd1\0\0\x3\x8d\0\0\0\x1\0\0)
main\centerSplit=@ByteArray(\0\0\0\xff\0\0\0\0\0\0\0\x2\0\0\x3\xe8\0\0\0\x82\x1\0\0\0\x2\x1\0\0\0\x2)
main\leftSplit=@ByteArray(\0\0\0\xff\0\0\0\0\0\0\0\x2\0\0\0\xbe\0\0\x3\xe8\x1\0\0\0\x2\x1\0\0\0\x1)
main\eventsView=@ByteArray(\0\0\0\xff\0\0\0\0\0\0\0\x1\0\0\0\x1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x3}\0\0\0\x6\x1\0\0\x1\0\0\0\0\0\0\0\0\0\0\0\0\x64\xff\xff\xff\xff\0\0\0\x81\0\0\0\0\0\0\0\x6\0\0\0\x64\0\0\0\x1\0\0\0\0\0\0\0\xa0\0\0\0\x1\0\0\0\0\0\0\0\x64\0\0\0\x1\0\0\0\0\0\0\0\xa8\0\0\0\x1\0\0\0\0\0\0\0\x43\0\0\0\x1\0\0\0\0\0\0\x1*\0\0\0\x1\0\0\0\0)
liveview\bandwidthMode=0
cameraArea\lastLayout=Demo
main\language=en
main\closeToTray=false
liveview\autoDeinterlace=false
disableUpdateNotifications=false
enableThumbnails=true
saveSession=true
startupFullscreen=false
startup=false
liveview\enableVAAPIdecoding=false
disableScreensaver\onFullscreen=true
disableScreensaver\onVideo=true
disableScreensaver\always=true

[servers]
0\displayName=v2demo.bluecherrydvr.com
Expand Down Expand Up @@ -41,3 +55,7 @@ liveview\bandwidthMode=0
0\cameras\65=Hessdalen
0\cameras\66=Amcrest IP3M-954E
0\cameras\67=Amcrest IP4M-1051

[eventPlayer]
pauseLive=false
mplayer_vo=default
27 changes: 27 additions & 0 deletions client/install-packages.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/bash

# Bash "strict mode", to help catch problems and bugs in the shell
# script. Every bash script you write should include this. See
# http://redsymbol.net/articles/unofficial-bash-strict-mode/ for
# details.
set -euo pipefail

# Tell apt-get we're never going to be able to give manual
# feedback:
export DEBIAN_FRONTEND=noninteractive

# Update the package listing, so we know what package exist:
wget -q https://dl.bluecherrydvr.com/key/bluecherry.asc -O- | apt-key add -
wget --output-document=/etc/apt/sources.list.d/bluecherry-bionic.list https://dl.bluecherrydvr.com/sources.list.d/bluecherry-bionic.list

apt-get update

# Install security updates:
apt-get -y upgrade

# Install a new package, without unnecessary recommended packages:
apt-get -y install --no-install-recommends bluecherry-client

# Delete cached files we don't need anymore:
apt-get clean
rm -rf /var/lib/apt/lists/*
12 changes: 12 additions & 0 deletions client/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash
docker run -it \
--net=host \
--device=/dev/dri/card0:/dev/dri/card0 \
--device=/dev/dri/renderD128:/dev/dri/renderD128 \
--device=/dev/snd/timer:/dev/snd/timer \
--device=/dev/snd/pcmC0D0p:/dev/snd/pcmC0D0p \
--device=/dev/snd/controlC0:/dev/snd/controlC0 \
--device=/dev/snd/seq:/dev/snd/seq \
--env="DISPLAY" --env="QT_X11_NO_MITSHM=1" --env="QT_GRAPHICSSYSTEM='native'" \
--ipc host \
--volume="$HOME/.Xauthority:/root/.Xauthority:rw" bluecherry-client

0 comments on commit bae4430

Please sign in to comment.