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?


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'

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

    driver: macvlan
      parent: enp2s0 # your adapter name goes here
      driver: default
        - 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.

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.


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.