본문 바로가기

리눅스

[리눅스] /var/run/docker.sock의 permission denied 발생하는 경우

728x90

/var/run/docker.sock의 permission denied 발생하는 경우

docker search zookeeper

$ docker search zookeeper                    
Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get "http://%2Fvar%2Frun%2Fdocker.sock/v1.24/images/search?limit=25&term=zookeeper": dial unix /var/run/docker.sock: connect: permission denied

현재 로그인된 사용자를 docker 그룹에 등록하기

$ echo $USER

$ sudo usermod -aG docker $USER

로그아웃했다가 다시 로그인합니다.

docker search zookeeper

$ docker search zookeeper      
NAME                               DESCRIPTION                                     STARS     OFFICIAL   AUTOMATED
zookeeper                          Apache ZooKeeper is an open-source server wh…   1156      [OK]       
jplock/zookeeper                   Builds a docker image for Zookeeper version …   165                  [OK]
wurstmeister/zookeeper                                                             157                  [OK]
mesoscloud/zookeeper               ZooKeeper                                       73                   [OK]
digitalwonderland/zookeeper        Latest Zookeeper - clusterable                  23                   [OK]
mbabineau/zookeeper-exhibitor                                                      23                   [OK]
tobilg/zookeeper-webui             Docker image for using `zk-web` as ZooKeeper…   15                   [OK]
debezium/zookeeper                 Zookeeper image required when running the De…   14                   [OK]
confluent/zookeeper                [deprecated - please use confluentinc/cp-zoo…   13                   [OK]
31z4/zookeeper                     Dockerized Apache Zookeeper.                    9                    [OK]
thefactory/zookeeper-exhibitor     Exhibitor-managed ZooKeeper with S3 backups …   6                    [OK]
engapa/zookeeper                   Zookeeper image optimised for being used int…   3                    
emccorp/zookeeper                  Zookeeper                                       2                    
josdotso/zookeeper-exporter        ref: https://github.com/carlpett/zookeeper_e…   2                    [OK]
harisekhon/zookeeper               Apache ZooKeeper (tags 3.3 - 3.4)               2                    [OK]
dabealu/zookeeper-exporter         zookeeper exporter for prometheus               1                    [OK]
paulbrown/zookeeper                Zookeeper on Kubernetes (PetSet)                1                    [OK]
openshift/zookeeper-346-fedora20   ZooKeeper 3.4.6 with replication support        1                    
perrykim/zookeeper                 k8s - zookeeper  ( forked k8s contrib )         1                    [OK]
duffqiu/zookeeper-cli                                                              1                    [OK]
strimzi/zookeeper                                                                  1                    
phenompeople/zookeeper             Apache ZooKeeper is an open-source server wh…   0                    [OK]
pravega/zookeeper-operator         Kubernetes operator for Zookeeper               0                    
midonet/zookeeper                  Dockerfile for a Zookeeper server.              0                    [OK]
humio/zookeeper-dev                zookeeper build with zulu jvm.                  0
728x90