REST API container create and port bindings REST API container create and port bindings docker docker

REST API container create and port bindings


(Apologies for the late answer, "community" decided to bump your question)

With the current 1.24 api, this is all done in the container create. You need to include the following there:

   "HostConfig": {     "PortBindings": { "22/tcp": [{ "HostPort": "11022" }] },   }


Did you try:{HostIp:"", HostPort:"11022"} ?