basler / gst-plugin-pylon

The official GStreamer plug-in for Basler cameras
BSD 3-Clause "New" or "Revised" License
42 stars 10 forks source link

Connecting to GigE camera from Docker container #94

Closed goncalog closed 7 months ago

goncalog commented 8 months ago

Hello, is there an alternative way to connect to a GigE camera from a Docker container other than using --network host?

The camera is Basler a2A1920-51gcPRO (40232887) and the Docker containers are configured via IoT Edge deployment manifests. Setting network to be host removes the original network (azure-iot-edge) which is added automatically (i.e. not by us).

For context, this is how we do it (based on this thread - https://github.com/Azure/iotedge/issues/6128):

"createOptions": {
                "NetworkingConfig": {
                    "EndpointsConfig": {
                         "host": {}
                    }
                },
                "HostConfig": {
                    "NetworkMode": "host"
                }
            }

Thank you very much!

goncalog commented 7 months ago

one can use a ipvlan or macvlan Docker network and connect the container to that network in order to see and connect to a GigE camera (https://docs.docker.com/network/drivers/ipvlan/ and https://docs.docker.com/network/drivers/macvlan/).