I am trying to run a docker container with the docker remote API. I was able to start the container, but could not open and map the container port to the host port.
I need a remote JSON API for the next ssh command
docker run -i -t --expose 80 -p 80:80 my_image_nodejs nodejs /var/www/server.js
I am using below JSON now.
{
"Image": "f96f6e304cfcd630ee51af87baf30dfd42cf1f361da873a2f62ce6654d7a4c6b",
"Memory": 0,
"MemorySwap": 0,
"VolumesFrom": "",
"Cmd": [
"nodejs",
"/var/www/server.js",
"-D"
],
"PortBindings": {
"80/tcp": [
{
"HostIp": "0.0.0.0",
"HostPort": "80"
}
]
},
"ExposedPorts": {
"80/tcp": {}
}
}
Thanks in advance
source
share