My home broadband is fast, but not as fast compared to other offerings today. It's good enough for most tasks, but docker push
often overwhelms my connection (see bufferbloat for more information). By default, docker uploads 5 layers at a time. This number of packets can overwhelm poor network devices. You'll see errors that look like this:
123448c47789: Retrying in 1 second
1234400ce987: Pushing 38.14MB/60.11MB
123486e84789: Retrying in 1 second
123400a72987: Layer already exists
dial tcp: lookup REGISTRY.NAME.com: No address associated with hostname
To slow docker down (and stop parallel uploads), edit systemd unit file (on my box at /usr/lib/systemd/system/docker.service
) and change the following line from this:
ExecStart=/usr/bin/dockerd
to this:
ExecStart=/usr/bin/dockerd --max-concurrent-uploads 1
The --max-concurrent-uploads
option is documented here.
Then stop docker, reload systemd (to load the changed unit file), and start docker:
# systemctl stop docker.service
# systemctl daemon-reload
# systemctl start docker.service