Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Docker service creation taking more time

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??

like image 510
Mac D'zen Avatar asked Feb 23 '26 01:02

Mac D'zen


1 Answers

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.

like image 118
King Chung Huang Avatar answered Feb 26 '26 17:02

King Chung Huang



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!