diff --git a/lib/datasource/docker/index.ts b/lib/datasource/docker/index.ts
index edc41f3c71b64322bbf3f799ee9c50837688603b..9e4ddd968a9d88873e44383c988e52c7b047ce67 100644
--- a/lib/datasource/docker/index.ts
+++ b/lib/datasource/docker/index.ts
@@ -478,6 +478,14 @@ async function getTags(
       );
       throw new ExternalHostError(err);
     }
+    // prettier-ignore
+    if (err.statusCode === 401 && registry.endsWith('docker.io')) { // lgtm [js/incomplete-url-substring-sanitization]
+      logger.warn(
+        { registry, dockerRepository: repository, err },
+        'docker registry failure: unauthorized'
+      );
+      throw new ExternalHostError(err);
+    }
     if (err.statusCode >= 500 && err.statusCode < 600) {
       logger.warn(
         { registry, dockerRepository: repository, err },