Skip to content

Instantly share code, notes, and snippets.

@3panda
Created December 16, 2021 23:44
Show Gist options
  • Save 3panda/b2009d10a50ae7cca301580bb724c925 to your computer and use it in GitHub Desktop.
Save 3panda/b2009d10a50ae7cca301580bb724c925 to your computer and use it in GitHub Desktop.
dockerを使っいて遭遇したトラブルと解決策を書いていく

About this document

dockerを使っいて遭遇したトラブルと解決策を書いていく

docker loginでエラーになる時

ブラウザからは同じusernameとpassで入れたのにdocker loginでusernameとpassを入力して下記のようなエラーが出た時

$ docker login
Authenticating with existing credentials...
Login did not succeed, error: Error response from daemon: Get "https://registry-1.docker.io/v2/": proxyconnect tcp: dial tcp: lookup proxy.example.com: no such host
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 (docker-username): docker-username
Password: 
Error response from daemon: Get "https://registry-1.docker.io/v2/": proxyconnect tcp: dial tcp: lookup proxy.example.com: no such host

解決策

proxyが必要ない状況だったので

/etc/systemd/system/docker.service.d/http-proxy.conf

[Service] 
# Environment="HTTP_PROXY=http://proxy.example.com:8080/"
# Environment="HTTPS_PROXY=http://proxy.example.com:8080/" 

のようにコメントアウト

サービスのリスタートとコンテナの起動して解決しました。

sudo systemctl daemon-reload
sudo systemctl restart docker
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment