Skip to content

4 ways to fix Docker: Error response from daemon: missing or empty content-length header

Docker is useful for deploying your software but it’s far from perfect and keeps running into random bugs and glitches from time to time. Be it deployment issues or problems arising from a specific container, Docker always keeps developers on their toes.

In this article, we’re talking about the “Docker: Error response from daemon: missing or empty content-length header” error that you might get during a docker pull. 

Also read: OpenShift vs Kubernetes: 7 key differences


Upgrade artifactory

It’s pretty likely that you’re using an outdated version of artifactory that’s triggering this error. If you’re in control of your artifactory installation, upgrade it to version 7.0.0 or later to resolve the error. In case you don’t have access to artifactory, you should follow up with your local artifactory admin to get to the bottom of the issue.


Downgrade docker client

Another potential fix for the issue is downgrading your docker client. If you’re on the latest docker release, there’s a chance that your accompanying programs haven’t yet been updated to be compatible with the latest docker version. Try downgrading your docker client to the previous stable release to see if that works. 

Top 7 IDEs and Text Editors to code Python, Java, C++, HTML and more

Check your docker registry

There’s a chance that your implementation of docker has some flaws that are causing the API endpoint to return a blank or no value to the content-length header. If you’ve made changes to the standard docker implementation, try reverting those changes to their default settings to resolve the issue. 


Try another macOS version

Several users have reported that they consistently get this error on macOS 11 but not on macOS 10. If you’re using macOS as your base platform, try using macOS 10 to see if that fixes the problem for you. That’s not to say that downgrading to macOS 10 is a confirmed fix or even a workaround for that matter. It’s just that based on other developer’s experiences, macOS 10 has a higher chance of your docker pull going through. 

Also read: How to fix the Nginx 500 internal server error?

Hello There!

If you like what you read, please support our publication by sharing it with your friends, family and colleagues. We're an ad-supported publication. So, if you're running an Adblocker, we humbly request you to whitelist us.

We may earn a commission if you buy something from a link on this page. Thanks for your support.







>