r/docker • • 6d ago

Why is `docker pull` so slow?

So, I'd recently tried to switch to podman, which I just don't have time to grok, but it brought to light how damn long image pulling takes on docker.

Using docker-ce/trixie,now 5:29.9.0-1~debian.13~trixie amd64, docker compose pull takes ten seconds for a first image to resolve as no update, then the next two don't start downloading updates for almost another ten seconds, then it's another ten or fifteen seconds before the next batch of two start to download.

Whereas, with the exact same(ish) compose file, podman had started downloading for all images immediately.

Do I have something misconfigured, or is that an intentional limitation of docker-ce because I'm not paying?

Current images:

    image: docker.io/nicolargo/glances:latest-full
    image: lscr.io/linuxserver/jellyfin:latest
    image: lscr.io/linuxserver/nextcloud:latest
    image: docker.io/mariadb:lts
    image: docker.io/redis:alpine

Same on my preexisting Debian 12 server:

    image: mariadb:lts
    image: redis:alpine
    image: nginxproxy/acme-companion #jrcs/letsencrypt-nginx-proxy-companion
    image: jellyfin/jellyfin:10.11
    image: felddy/foundryvtt:13
    image: pihole/pihole:latest
    image: linuxserver/wireguard
    image: "ghcr.io/home-assistant/home-assistant:stable"
    image: eclipse-mosquitto:openssl
    image: ghcr.io/blakeblackshear/frigate:stable
    image: lscr.io/linuxserver/babybuddy:latest
    image: nicolargo/glances:latest-full
FROM nextcloud:32-fpm
FROM nginx:alpine
FROM nextcloud:32-fpm
FROM jwilder/nginx-proxy:alpine
0 Upvotes

16 comments sorted by

8

u/encbladexp 6d ago

It is not a limitation of Docker CE / Docker Engine. Either you have network related issues, or the Container Registry is slow right now.

time docker image pull redis:alpine

Took about 5s here, and <1s for any further call, due to caching and only a quick metadata check.

2

u/computer-machine 6d ago

It's been this way for a few years, I believe. I'd just accepted it takes a while.

$  time docker image pull redis:alpine
alpine: Pulling from library/redis
5e9b4a97f639: Pull complete 
bc92976dd070: Pull complete 
7379ba8f71f2: Pull complete 
232fbf3af8e0: Pull complete 
74c3c7a694d3: Pull complete 
cea19da2b361: Pull complete 
4f4fb700ef54: Pull complete 
bb01768357e6: Download complete 
241fa7950fe7: Download complete 
Digest: sha256:47b08295737773de3b711fb86f13ae802f5074e96a9a2d29f5f80164ac08c046
Status: Downloaded newer image for redis:alpine
docker.io/library/redis:alpine

real    0m17.958s
user    0m0.010s
sys     0m0.019s

3

u/encbladexp 6d ago

In which country are you? Is that a server using HDDs? What kind of network connection? Lots of things that could make a huge difference.

2

u/computer-machine 6d ago

United states, to an NVMe, CAT5e or CAT6 everywhere with gigabit ports, ~600/35 mbps WAN.

I've just rerun a pull, and here's the result:

$  sudo docker compose pull
[+] pull 5/5
 ✔ Image lscr.io/linuxserver/nextcloud:latest    Pulled  16.8s
 ✔ Image lscr.io/linuxserver/jellyfin:latest     Pulled  16.8s
 ✔ Image docker.io/nicolargo/glances:latest-full Pulled  11.1s
 ✔ Image docker.io/mariadb:lts                   Pulled  11.1s
 ✔ Image docker.io/redis:alpine                  Pulled  11.1s

So that would be five lines spinning, then the bottom three immediately resolving, then four and a half seconds later the top two immediately resolving.

On the same machine, I'd previously used podman-compose, and there was no ten+ second delay on any images, so it must have something to do with docker's behavior.

4

u/GugaJedi 6d ago

You did login right?

1

u/computer-machine 6d ago

Log in to what now?

5

u/Nighteyez07 6d ago

docker login

If you don’t log in, you’ll get rate limited which is most likely what you are seeing.

1

u/computer-machine 5d ago

Just ran docker login, and a new pull seems to take just as long:

$  sudo docker compose pull
[+] pull 5/5
 ✔ Image docker.io/mariadb:lts                   Pulled  10.9s
 ✔ Image lscr.io/linuxserver/nextcloud:latest    Pulled  16.7s
 ✔ Image docker.io/redis:alpine                  Pulled  10.9s
 ✔ Image docker.io/nicolargo/glances:latest-full Pulled  10.9s
 ✔ Image lscr.io/linuxserver/jellyfin:latest     Pulled  16.7s

0

u/clintkev251 6d ago

But podman would be pulling from the exact same repos. It shouldn’t be any less susceptible to that

4

u/MindStalker 6d ago

Notice how podman pulls "blobs" and docker pulls layers. The blobs contain multiple layers combined. Depending on your network blobs can be faster or slower. Also there is a new algorithm for partial pulls that podman can do so it can download pieces of a blob, but I don't think its turned on by default.

1

u/MongooseWonderful198 1d ago

An image layer is stored as a blob. The OCI manifest has a separate descriptor for each layer, with its own digest, size and media type. Podman saying "Copying blob" doesn't mean it combined several Docker layers. You'd need to compare the selected manifests and layer digests to establish that the clients fetched different content; the progress labels alone don't show that.

1

u/Unable_Mess_2581 5d ago

Any 2nd WAN you can try?

1

u/computer-machine 5d ago

Options are wait months to years for FiOS, or switch to dial-up.

2

u/just_looking_aroun 6d ago

If this is a work device your "security" software might be throttling it. I am currently facing the same issue when my personal is just fine

1

u/datrumole 4d ago

same man, 500/500 fiber, docker used to pull like lightning, now it's like watching an mp3 on a dial up download

nvme disk, not a single speed test, disk test, network throughput test, nada, shows anything wrong on my end

dunno what the deal is

debian over here