Docker Compose stuck downloading or pulling fs layer

后端 未结 7 1324
忘了有多久
忘了有多久 2021-02-05 06:34

I have the latest Docker for Mac installed, and I\'m running into a problem where it appears that docker-compose up is stuck in a Downloading state for one of the c

相关标签:
7条回答
  • 2021-02-05 06:44

    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 OS X toolbar: Docker for Mac in the OS X toolbar with restart button

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

    0 讨论(0)
  • 2021-02-05 06:48

    I'm running OSX and restarting Docker for Mac didn't help. Neither did a full restart or upgrading VirtualBox. What did work was turning my wifi interface on and off every time it got stuck. I had to do this repeatedly, but it eventually downloaded the entire image.

    0 讨论(0)
  • 2021-02-05 06:51

    I found a possible workaround. I have my docker engine installed in a Ubuntu 18.04 Snap Environment. I discovered searching in some forums that users relate this behaviors to limitation in the download bandwith. So in the picture below you are going to watch that the components was stucked

    Part of the Downloads stucked and finally I cancelled the process CTRL + C

    I added two parameters or flags in the configuration file that controls the docker daemon behavior: max-concurrent-downloads 1 and max-concurrent-uploads 1 In my case remember, i am working in a snap environment. This file is located in this directory: /var/lib/docker/current/config/daemon.json

    REMEMBER TO STOP ALL DOCKER PROCESS BEFORE THE FILE MODIFICATION, AND CREATE BACKUP OF THE FILE

    Add the two lines in the picture. This is going to help you to limit the downloads to only one by one

    This is the process that helped me to resolve this problem. Download Succesfull

    0 讨论(0)
  • 2021-02-05 06:55
    • Completely remove docker
    • Install docker again
    • It should work now

    I tried to restar docker, update docker, but didnt help

    0 讨论(0)
  • 2021-02-05 06:58

    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
      
    0 讨论(0)
  • 2021-02-05 07:01

    I had the similar situation this morning where my network suddenly went down and I was forced to power cycle the modern, while docker-compose was still in the middle of downloading stuff from docker hub.

    Yes, bouncing the docker daemon process seems to resolve this.

    For Linux users - do sudo service docker restart to fix it.

    0 讨论(0)
提交回复
热议问题