I'm tring to run a daemon process in the docker container with API/1.5,and here is my POST request, and the containter is created successed while the command seemed run failed,what's the problem here?pls give me some advance,thanks.

{
                    "Hostname":"",
                    "User":"",
                    "Memory":10000000,
                    "MemorySwap":0,
                    "AttachStdin":true,
                    "AttachStdout":true,
                    "AttachStderr":true,
                    "PortSpecs": ["8080:8080"],
                    "Privileged": true,
                    "Tty":true,
                    "OpenStdin":true,
                    "StdinOnce":false,
                    "Env":null,
                    "Cmd":[
                            "nc", "-l", "8080"
                    ],
                    "Dns":null,
                    "Image":"base",
                    "Volumes":{},
                    "VolumesFrom":"",
                    "WorkingDir":"~"
            }

And here is the response:

HTTP/1.1 201 Created
Content-Type: application/json
Content-Length: 113
Date: Sun, 29 Sep 2013 13:27:52 GMT

{"Id":"9a880dcbbbda","Warnings":["Your kernel does not support memory swap capabilities. Limitation discarded."]}

And I tested if the container is running with sudo docker ps -l and showed that:

ID                  IMAGE               COMMAND                CREATED             STATUS              PORTS
9a880dcbbbda        base:latest         nc -l 8080    33 seconds ago      Exit 0
有帮助吗?

解决方案

The result includes a warning, but it is just a warning, not an error.

It means that your system cannot limit the memory or swap allocated to the container, and therefore, the container will run without the memory or swap limitation. But other than that, it should be running fine.

Is there anything indicating that the container is not running correctly?

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top