wsl環境にdockerをインストールして、いざpullしようとすると
permission denied while trying to connect to the docker API at unix:///var/run/docker.sock
のエラー
どうゆうこと
調べるとどうも権限がないのが原因らしい
///var/run/docker.sock
ここに今使っているユーザーで権限を上げればいい
今使っているユーザー名が「test01」だとしたら
sudo chown test01 ///var/run/docker.sock
これで権限が与えられたので上手くいきます!!
試しにpullしてみよう
sudo docker pull mysql
Using default tag: latest
latest: Pulling from library/mysql
7a5e1e917526: Pull complete
57bd38a2d740: Pull complete
e4f376e797b1: Pull complete
f6a972aa365b: Pull complete
98d18218e1bb: Pull complete
ac5a3aa7003a: Pull complete
aff72f8f4e98: Pull complete
b843491434c1: Pull complete
ba8d858f8b56: Pull complete
55f85a7d691e: Pull complete
6cb2348819f8: Download complete
a12c35ca5779: Download complete
Digest: sha256:fe036967257bf11aab7184e371920c5b629f0dd36cbefdf4ccd2ae18cc900dbd
Status: Downloaded newer image for mysql:latest
docker.io/library/mysql:latest
成功!!!

コメント
You could certainly see your enthusiasm within the article you write.
The world hopes for more passionate writers like you who are not
afraid to mention how they believe. All the time go after your heart.
Nice post. I learn something new and challenging on websites I stumbleupon everyday.
It’s always helpful to read content from other authors and practice a
little something from their sites.
What’s up, after reading this amazing paragraph i am too cheerful to share my familiarity here with colleagues.
My spouse and I stumbled over here from a different page and
thought I may as well check things out. I like what I see so i am just following you.
Look forward to finding out about your web page again.
I am genuinely thankful to the owner of this web page who has shared this impressive post at at this place.
I love what you guys tend to be up too. This sort of clever work and
reporting! Keep up the good works guys I’ve incorporated you guys to blogroll.