Docker pull hangs forever

Hi,

I just started to get a few problems recently with docker pull.

I have this very simple example, which cleans everything and then pulls the image I need most often:

---
kind: pipeline
name: default

steps:  
  - name: cleanup
    image: docker
    commands:
      - docker system prune --volumes -f -a
      - docker pull mcr.microsoft.com/dotnet/core/sdk:3.1-buster
      - docker pull mcr.microsoft.com/dotnet/core/aspnet:3.1-buster-slim
    volumes:
      - name: docker1
        path: /var/run/docker.sock
      - name: docker2
        path: /var/lib/docker
      
volumes:
  - name: build
    temp: {}
  - name: release
    temp: {}
  - name: docker1
    host:
      path: /var/run/docker.sock
  - name: docker2
    host:
      path: /var/lib/docker

It does not happen all the time, but most of the time recently.

What I tried

  • Rebooting
  • Updating docker to 19.03.12
  • Updating drone to 1.19 and drone-runner-docker to 1.5.0
  • Pulling the image from the host machine => works.

I have not changed anything else, it just started today.

It seems to hang after a few layers: https://build.squidex.io/SebastianStehle/cleaner/332/1/2

This question is probably more appropriate for the Docker support team. Your yaml would be (roughly) translated to the following docker commands:

# docker volume where your code is cloned
docker volume create workspace

# pipeline step converted to a docker run command
docker run \
 -v /var/lib/docker:/var/lib/docker \
 -v /var/run/docker.sock:/var/run/docker.sock \
 -v workspace:/drone/src \
 -w /drone/src \
 docker /bin/sh -c "docker system prune ...; docker pull ...; docker pull ...;"

If the above docker command fails, or docker periodically freezes when pulling an image using a mounted docker socket, the Docker team would be more qualified to help you troubleshoot.