金. 10月 7th, 2022

はじめに

docker pullした際、以下のような TLS handshake timeout が発生

# docker pull koda/docker-knowledge
Using default tag: latest
Trying to pull repository docker.io/koda/docker-knowledge ... 
latest: Pulling from docker.io/koda/docker-knowledge
55cbf04beb70: Pulling fs layer 
1607093a898c: Pulling fs layer 
9a8ea045c926: Pulling fs layer 
1290813abd9d: Waiting 
8a6b982ad6d7: Waiting 
abb029e68402: Waiting 
8cd067dc06dc: Waiting 
1b9ce2097b98: Waiting 
d6db5874b692: Waiting 
25b4aa3d52c5: Waiting 
53ec227dabf0: Waiting 
242938ace8b4: Waiting 
85bc5aaf4ec5: Waiting 
fd5b749ebe99: Waiting 
6636846685ec: Waiting 
error pulling image configuration: Get https://production.cloudflare.docker.com/registry-v2/docker/registry/v2/blobs/sha256/9a/9ae2dde61ad6947df46e2cc416be9249f314d187feb717f6e18c0dc9a46bf5bf/data?verify=1538549397-3vZspNti03KIKxRXPmQsQeUbucI%3D: net/http: TLS handshake timeout
#

解決方法

docker login

# docker login
Login with your Docker ID to push and pull images from Docker Hub. If you don't have a Docker ID, head over to https://hub.docker.com to create one.
Username: 
Password: 
Login Succeeded
#
一度ログインすると、その後取得が可能になる
# docker pull koda/docker-knowledge
Using default tag: latest
Trying to pull repository docker.io/koda/docker-knowledge ... 
latest: Pulling from docker.io/koda/docker-knowledge
55cbf04beb70: Pull complete 
1607093a898c: Pull complete 
9a8ea045c926: Pull complete 
1290813abd9d: Pull complete 
8a6b982ad6d7: Pull complete 
abb029e68402: Pull complete 
8cd067dc06dc: Extracting 7.242 MB/122.1 MB
1b9ce2097b98: Download complete 
d6db5874b692: Download complete 
25b4aa3d52c5: Download complete 
53ec227dabf0: Download complete 
242938ace8b4: Download complete 
85bc5aaf4ec5: Download complete 
fd5b749ebe99: Download complete 
6636846685ec: Download complete