简体   繁体   中英

docker compose up received unexpected HTTP status: 503 Service Unavailable

I am trying to create a nodejs docker app using image node:16.13.1. (I have tried to use other version). There is slow network at my location. Every time I tried to run sudo docker-compose up -d , it took longer time to download one large size intermediate container/image. Till that time, one other image does 3 retries to download, and then suddenly command fails with below error.

received unexpected HTTP status: 503 Service Unavailable

Building node-app
Sending build context to Docker daemon  3.556MB
Step 1/8 : FROM node:16.13.1
16.13.1: Pulling from library/node
9b99af5931b3: Pull complete
b6013b3e77fe: Downloading [=============================================>     ]  7.097MB/7.834MB
bbced17b6899: Download complete
8b609dabefa8: Download complete
50544bfef33d: Downloading [=================================================> ]    **189MB/192.4MB**
fea3f8b8e075: Download complete
c81dbcaf60d9: Download complete
7b0e069b3bda: Downloading
29ac9271f536: Waiting
received unexpected HTTP status: 503 Service Unavailable
ERROR: Service 'node-app' failed to build : Build failed

Sometimes it prints connection reset by peer before 503 error.

read tcp <my-ip>:36140->104.18.122.25:443: read: connection reset by peer

Looks like its a docker instability of some restriction of your network (i test it here at 2 computers), you can also try to flush DNS from your computer, this DNS error already occurs in docker according this discussion https://forums.docker.com/t/docker-pull-503-service-unavailabl/2401

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM