3
$\begingroup$

I installed a command line tool which accepts genicam packets from a device as input into a docker image. If I use the option --network host in the run command for the container the packets are received. If I use -p 3956:3956/udp to expose the Genicam default port 3956 (e.g. stated here: RoboRealm - GenICam - Instructions) in the run command of the container I don't get packets. What did I wrong? Could the port be different from the default? How could I get the changed port then?

$\endgroup$
1
$\begingroup$

Here is a plug and play solution in docker compose for it, however please check your container for vulnerabilities. If you do not use docker networks you can use network mode host instead.

version: '3.7'

services:
  your_container:
    image: your_image
    container_name: your_container
    #network_mode: host
    networks:
     - camera_vlan

networks:
  camera_vlan:
    driver: macvlan
    driver_opts:
      parent: enp2s0 # your adapter name goes here
    ipam:
      driver: default
      config:
        - subnet: "your.device.ip.goes/here"
```
New contributor
Gornoka is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
$\endgroup$
0
$\begingroup$

Because Genicam will actually use another 2 random ports to establish the connection. You are supposed to be able to force those to a specific value but that's not well documented. The way I tried to solve it was by creating a macvlan network. https://docs.docker.com/network/macvlan/

If you are networking with unfamiliar protocols Wireshark is always a good place to start. It lets you see every single packet that passes in/out/between your computer.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.