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 1.1.1.1:50 -P until --seconds 30 -P analyze -w -o /1_1_1_1_50.txt -O drop 

Output: * Error: ip: address 1.1.1.1:50 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": [
    "tsp",
    "-I ip 1.1.1.1:50 -P until --seconds 30 -P analyze -w -o /1_1_1_1_50.txt -O drop"
  ],
  "Image": "shashibanger/tsduck:1.0",
  "HostConfig":
  {
    "AutoRemove": true
  } 
}

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

tsp: unknown option -I  

Any help?

Thanks

Source: StackOverflow

LEAVE A COMMENT