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
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.
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.
Someone who writes/edits/shoots/hosts all things tech and when he’s not, streams himself racing virtual cars. You can reach out to Yadullah at [email protected], or follow him on Instagram or Twitter.