Home > Enterprise >  Why is my container not running?"Running": false
Why is my container not running?"Running": false

Time:08-26

When I run

docker container create -i -t --name mycontainer alpine
a95321be84cc14458b3283d97f21d26dd093139bf5a0f67c31a0ab4adbe3fd11

Let's inspect the container

"Id": "a95321be84cc14458b3283d97f21d26dd093139bf5a0f67c31a0ab4adbe3fd11",
"Created": "2022-08-25T09:19:11.576071965Z",
"Path": "/bin/sh",
"Args": [],
"State": {
    "Status": "created",
    "Running": false,
    "Paused": false,
    "Restarting": false,
    "OOMKilled": false,
    "Dead": false,
    "Pid": 0,
    "ExitCode": 0,
    "Error": "",
    "StartedAt": "0001-01-01T00:00:00Z",
    "FinishedAt": "0001-01-01T00:00:00Z"

I am on Ubuntu,version

Server: Docker Engine - Community
 Engine:
  Version:          20.10.17
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.17.11
  Git commit:       a89b842
  Built:            Mon Jun  6 23:01:03 2022
  OS/Arch:          linux/amd64

Why?

CodePudding user response:

You didn't run the container, you just created it. It is ready to run, but not yet running.

docker container start mycontainer will run the container you created. It should then show up in the container list - docker container list.

  • Related