4

i'm new to this docker service creation please help me if i'm wrong , i executed this command docker service create --name "testApp" -p 8000:8000 testApp Its taking too long time to execute (stuck at overall progress 0 out of 1 tasks) so that my shell is getting timeout . anything wrong am i doing here??

Mac D'zen
  • 151
  • 11

1 Answers1

1

You can inspect the service task(s) to find out what's happening. The following command will show all the tasks for your testApp service.

docker service ps testApp

The CURRENT STATE and ERROR columns might give you some information. You can get the full status details by inspecting a specific task using docker inspect $TASK_ID, where $TASK_ID is the ID of the one of the tasks from the service. The Status section will show information like this.

"Status": {
    "Timestamp": "2018-07-28T10:45:03.4277984Z",
    "State": "running",
    "Message": "started",
    "ContainerStatus": {
        "ContainerID": "d85be58fc6f84e28ee42c578a65923237e3b60c1c82b18382c39d13a69b10b84",
        "PID": 40335,
        "ExitCode": 0
    },
    "PortStatus": {}
}

Usually, the information in there is enough to diagnose basic problems with creating a service.

King Chung Huang
  • 5,026
  • 28
  • 24