Docker Compose stuck downloading or pulling fs layer

I just needed to restart Docker.

Linux users can use sudo service docker restart.

Docker for Mac has a handy button for this in the Docker widget in the macOS toolbar: Docker for Macintosh in the macOS toolbar with restart button

If you happen to be using Docker Toolkit try docker-machine restart.


I faced the same problem! Restarting the service didn't help, downloading again didn't help. It used to get stuck at random instances leaving me with no option but to kill the pull request.

One thing which worked for me was to download 1 file at a time. For Ubuntu users, you can use the following steps:

  1. Stop the service:

    sudo service docker stop
    
  2. Start docker with max concurrent download set as 1:

    sudo dockerd --max-concurrent-downloads 1
    
  3. Download the required image:

    sudo docker pull <image_name>
    
  4. Download images, after that stop the terminal and start the daemon again as it was earlier.

    sudo service docker start