MATRIX VISION - mvBlueCOUGAR-X/-XD Technical Documentation
Using GigE Vision™ Devices In A Docker Container

When developing machine vision applications using Docker containers, it might be required to access GigE Vision™ devices inside the container. With the mvIMPACT Acquire driver stack this can be achieved fairly easily and this chapter will demonstrate how to build a basic Docker container where GigE Vision™ devices can be used. It is recommended to use a native Linux machine as host system for this type of application.

Host Preparation


The Linux host network interface card has to be first configured for an optimized GigE Vision™ transmission: Checklist for Linux


It is not recommended to use GigE Vision™ devices in Docker containers on Windows, because the data transfer rate is highly limited due to the network implementation of WSL2 and the set-up to access the device is complicated enough. If the device has to be operated this way, please check the set-up instructions for Windows below.

The Windows host NIC has to be first configured for an optimized GigE Vision™ transmission: Checklist for Windows

Host system requirements

  • Windows 11 64-bit: Home or Pro version 21H2 or higher, or Enterprise or Education version 21H2 or higher
  • Windows 10 64-bit: Home or Pro 21H1 (build 19043) or higher, or Enterprise or Education 20H2 (build 19042) or higher
  • WSL2 backend (For installation please follow: Docker Window Install)

Building A Docker Image

The following demo Dockerfile builds a basic Docker image based on a slim version of Debian, where the mvIMPACT Acquire GenTL driver package and its sample programs are installed. This Dockerfile can be used in many ways:

  • Use it directly to test your device in a Docker container.
  • Use it as a base image for your device applications.
  • Use it as an inspiration for building your own Dockerfile.

Before building the Dockerfile, please download the mvIMPACT Acquire GenTL driver installation files from MATRIX VISION GmbH website ( (e-mail address is required):

  • The installation script:
  • The installation package: mvGenTL_Acquire-x86_64_ABI2-*.tgz (* should be replaced by the version number)

Create a directory called mvIMPACT_Acquire (as used in this demo Dockerfile) and move both installation files into this directory. In this example, both files are downloaded into the Downloads directory and the mvIMPACT_Acquire directory is created inside the Downloads directory:

$ cd ~/Downloads
$ mkdir mvIMPACT_Acquire
$ mv mvGenTL_Acquire-x86_64_ABI2-*.tgz mvIMPACT_Acquire/

Make the installation script executable:

$ cd mvIMPACT_Acquire
$ chmod a+x

Navigate back into the directory where mvIMPACT_Acquire resides (e.g. Downloads) and create your Dockerfile:

$ cd ~/Downloads
$ touch Dockerfile

Create the content of your Dockerfile. Our demo Dockerfile (for Linux x86_64) looks as follows:

# start with slim version of actual Debian
FROM debian:9-slim

ENV DEBIAN_FRONTEND noninteractive

# entrypoint of Docker
CMD ["/bin/bash"]

# set environment variables
ENV TERM linux
ENV GENICAM_GENTL64_PATH /opt/mvIMPACT_Acquire/lib/x86_64
ENV GENICAM_ROOT /opt/mvIMPACT_Acquire/runtime
ENV container docker

# update packets and install minimal requirements
# after installation it will clean apt packet cache
RUN apt-get update && apt-get -y install build-essential \
    iproute2 && \
    apt-get clean && \
    rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

# move the directory mvIMPACT_Acquire with *.tgz and *.sh files to the container
COPY mvIMPACT_Acquire /var/lib/mvIMPACT_Acquire

# execute the setup script in an unattended mode
RUN cd /var/lib/mvIMPACT_Acquire && \
    ./ -u && \
    rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
In case of ARM architectures, all occurrences of "x86_64" in this demo Dockerfile have to be replaced by the correct platform e.g. "arm64" and the install script to use will be then.

Finally, build a Docker image using this Dockerfile:

$ sudo docker build -t [image_name] .
Please make sure to call docker build from within the directory where the Dockerfile resides. Note that Internet access is required for the docker build.

If built successfully, the newly built [image_name] will be listed when calling:

$ sudo docker images

Starting The Docker Container


Start the Docker container with --net=host flag, so that it will use the host network instead of the default bridge network:

$ sudo docker run -ti --net=host [image_name] /bin/bash


Since the Docker host mode networking doesn't work on Windows due to the isolated network namespace of Docker daemon, the container needs to be started using the default bridge network with specific ports published for receiving GigE Vision™ streaming packets. For instance, port 49152 can be used for event messages and port 49153 for streaming packets:

$ sudo docker run -ti -p 49152:49152/udp -p 49153:49153/udp [image_name] /bin/bash

Inside the container, the GigE Vision™ device needs to be discovered first. Since the Docker bridge network resides in a different subnet, unicast needs to be applied in order to discover the GigE Vision™ device. Follow Unicast Device Discovery via mvIPConfigure or use mvIMPACT Acquire SDK (see InterfaceModule.mvUnicastDeviceDiscoveryCommandCount() etc.) to set up the unicast procedure.

Once the GigE Vision™ device has been discovered by unicast and initialized by, several GVSP transport layer parameters still need to be configured before being able to receive streaming packets due to the WSL2 NAT network. Here are the parameters that need to be changed manually:

  • Assign one published port (e.g. 49152 for example) to GevMCPHostPort
  • Assign the other published port (e.g. 49153 for example) to GevSCPHostPort
  • Assign the windows host IP address to GevSCDA
  • Increase the packet size GevSCPSPacketSize manually to 1500


After starting the container, the correct operation of GigE Vision™ devices can be validated by running one of the sample programs provided by the mvIMPACT Acquire (e.g. SingleCapture):

$ cd /opt/mvIMPACT_Acquire/apps/SingleCapture/x86_64
$ ./SingleCapture

If the attached GigE Vision™ device appears in the device list of the program's output, access to it in the container by using the mvIMPACT Acquire has been established. Now the GigE Vision™ device can be used inside the Docker container for your machine vision applications.