Skip to content

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

  • by
  • 2 min read

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?

Yadullah Abidi

Yadullah Abidi

Yadullah is a Computer Science graduate who writes/edits/shoots/codes all things cybersecurity, gaming, and tech hardware. When he's not, he streams himself racing virtual cars. He's been writing and reporting on tech and cybersecurity with websites like Candid.Technology and MakeUseOf since 2018. You can contact him here: yadullahabidi@pm.me.

>