CMD Args not recognized when starting container through Docker API

  api, containers, docker

If i run a container via cli like this, works like a charm:

docker run --rm shashibanger/tsduck:1.0 tsp -I ip -P until --seconds 30 -P analyze -w -o /1_1_1_1_50.txt -O drop 

Output: * Error: ip: address is not multicast (Which is expected)

The problem appears when i try to do the exact same thing via Docker API. First, im creating the container with this json body:

  "Cmd": [
    "-I ip -P until --seconds 30 -P analyze -w -o /1_1_1_1_50.txt -O drop"
  "Image": "shashibanger/tsduck:1.0",
    "AutoRemove": true

Then, i start the container and recieve the following error:

tsp: unknown option -I  

Any help?


Source: StackOverflow