Installing CVB in Docker


We want to be able to distribute our app using docker. Has anyone been successful in this?

We experience problems getting the debian package installed without errors (the errors are related to run-level determination) after installation we can compile and link against the cvb library but we cannot run the program as it fails.

Unpacking codemeter (5.22.1504.500) ...
Setting up codemeter (5.22.1504.500) ...
invoke-rc.d: could not determine current runlevel
invoke-rc.d: policy-rc.d denied execution of start.
Processing triggers for mime-support (3.59ubuntu1) ...
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for systemd (229-4ubuntu21.4) ...
Processing triggers for libc-bin (2.23-0ubuntu10) ...
Selecting previously unselected package cvb-foundation-dev.
(Reading database ... 112023 files and directories currently installed.)
Preparing to unpack .../cvb-foundation-dev-13.01.003-ubu1604-x86_64.deb ...
Unpacking cvb-foundation-dev (13.01.003) ...
Selecting previously unselected package cvb-tools-dev.
Preparing to unpack .../cvb-tools-dev-13.01.003-ubu1604-x86_64.deb ...
Unpacking cvb-tools-dev (13.01.003) ...
Selecting previously unselected package cvb-camerasuite.
Preparing to unpack .../cvb-camerasuite-13.01.003-ubu1604-x86_64.deb ...
Unpacking cvb-camerasuite (13.01.003) ...
Selecting previously unselected package cvb-foundation.
Preparing to unpack .../cvb-foundation-13.01.003-ubu1604-x86_64.deb ...
Unpacking cvb-foundation (13.01.003) ...
Selecting previously unselected package cvb-camerasuite-dev.
Preparing to unpack .../cvb-camerasuite-dev-13.01.003-ubu1604-x86_64.deb ...
Unpacking cvb-camerasuite-dev (13.01.003) ...
Selecting previously unselected package cvb-tools.
Preparing to unpack .../cvb-tools-13.01.003-ubu1604-x86_64.deb ...
Unpacking cvb-tools (13.01.003) ...
Setting up cvb-camerasuite (13.01.003) ...
Setting CVB services up...
Failed to retrieve/decode the log configuration for module GEVSVC: Failed to connect to the shared memory with connection info: No such file or directory

                  (c) 2015 STEMMER IMAGING GmbH

STEMMER IMAGING Logging Service Application 
BuildDate : 	Feb 28 2018

Enter service
Setting up cvb-foundation (13.01.003) ...
Setting up cvb-camerasuite-dev (13.01.003) ...
Setting up cvb-tools (13.01.003) ...
Setting up cvb-foundation-dev (13.01.003) ...
Setting up cvb-tools-dev (13.01.003) ...

@mla, sorry for replying that late, but codemeter and :cvb: setups are not intended for Docker installation. The errors you see come from trying to register the necessary daemons. To be able to install the packages you need to split the installation and get rid of the postinst script (and then do some of the work later).


> dpkg --unpack path/to/codemeter*.deb
> rm /var/lib/dpkg/info/codemeter.postinst
> dpkg --configure codemeter
> dpkg --unpack path/to/cvb-camerasuite-13.01*.deb
> rm /var/lib/dpkg/info/cvb-camerasuite.postinst
> dpkg --configure cvb-camerasuite
> ldconfig

and starting with version 13.01.004

> ln -s `find /opt/ -name cvb-*` /opt/cvb

The other packages can be installed normally via dpkg -I.


For the following start-up script I assume that you want to use a GigE Vision cameras with CameraSuite licensing only.

Before you start your app in the container you need to start at least two services manually and source some environment variables. The most direct way would be a start script in your image which is run in the container:

/opt/cvb/bin/siGevSvc -s
. /etc/profile.d/

After that you can start your app.

Also, if you want to persist settings you need to map the following directories outside the container:

  • /etc/opt/cvb
  • /var/opt/cvb

Thank you for your reply, i got it working inside docker, but i am unable to get rid of the watermark.

my startup script

/opt/cvb/bin/siLogSvc -s
/opt/cvb/bin/siGevSvc -s
. /etc/profile.d/

i have added the license key to /opt/cvb/camerasuite.lic but it does not seem to work.

best regards
Morten Larsen

First the file should be located under:


Did you write the camerasuite.lic inside the image? Do the keys inside this file work outside the container?

I would recommend to put that file outside of the image and mount it there (or mount it somewhere else and adjust the $CVBDATA environment variable pointing to that location. Also other information will be saved there which you might want to persist.

Thank you for your quick reply and assistance.

I am running cvb version 13.01.003

i am mounting

"-v /etc/opt/cvb:/etc/opt/cvb"
"-v /var/opt/cvb:/var/opt/cvb"

the /etc/opt/cvb on the host machine contains the driver

cat /etc/opt/cvb/drivers/GenICam.ini 
Interface=SD::MAC->correct mac for this host
Vendor=Allied Vision Technologies
Model=Mako G-507B (9616)
SerialNumber=redacted by me

ls /var/opt/cvb/

camerasuite.lic  genicam  GenICamBrowser.xml  log  Registry

I copied the driver from a working system and changed the mac address to match the new host. Then i copied the camerasuite.lic file where i found it in the old system (on that it was located in /opt/cvb/camerasuite.lic) i did also copy the complete contents of /var/opt/cvb to the new machine, perhaps this is the problem?


Turns out you have to disable the firewall completely on the host system

systemctl firewalld stop

for the watermark to disappear, can you confirm this? the new host system is centos7 btw.

Hi there!

when working with a CameraSuite license, this behaviour would in fact make sense because the license validity check relies on being able to every now and then talk to the camera. If a firewall prevents this, this would in fact be interpreted as “camera is not there” in which case the CameraSuite license is inactive.

Hello, I am trying to get a Teledyne-DALSA-Linea-GigE camera working inside Docker using CVBpy. I followed the steps described above, and now I can connect to the camera from within Docker.

However, when I start a stream and wait for images (stream.wait_for(…) ), I never receive an image and a time-out occurs. Exactly the same script runs fine in windows. Does someone has any clue what it could be?

Hi @patryk105,

this sound again like either a firewall or routing problem. GEV uses a standardized port for its control protocol. And statefull firewalls can hande a request answer which originated inside of its system. For streaming, though, the camera starts the connection to the dynamically assigned port in your app (it is done automatically).

Thus your system must be able to connect to on any port above 1024 from the outside.