• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

‘docker images’ command error – “Permission Denied”

by admin

The Problem

A regular user is not able list images using docker images command. Following error can be observed.

user01> docker images
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.27/images/json: dial unix /var/run/docker.sock: connect: permission denied

The Solution

User is not part of docker group and doesn’t have permissions to execute docker related commands.

Add regular user to docker group so that they would able to use docker commands.

[root@host-docker ~]# id user01
uid=1000(user01) gid=1000(user01) groups=1000(user01),10(wheel),983(docker)
[root@host-docker ~]#
[root@host-docker ~]# su - user01
Last login: Thu May 24 23:17:03 IST 2018 from example.com on pts/1

[user01@host-docker ~]$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
user01 latest ab15b83d00ea 32 hours ago 1.29GB
test_web latest 07d0c8441153 6 days ago 234MB

Filed Under: CentOS/RHEL 7, DevOps, Docker, Linux

Some more articles you might also be interested in …

  1. How to Find and Delete Empty Directories and Files in Linux
  2. How To Disable Weak Cipher And Insecure HMAC Algorithms in SSH services for CentOS/RHEL 6 and 7
  3. Creating and Removing Files and Directories Under Linux
  4. Linux Command line Basics – Executing commands from the command line
  5. Magento 2.3.3 Redis cache grows unlimited
  6. arecord Command Examples in Linux
  7. grub2-mkconfig: command not found
  8. How to obtain virtual/physical CPU information in Oracle VM (XEN)
  9. tee Command Examples in Linux
  10. links Command Examples in Linux

You May Also Like

Primary Sidebar

Recent Posts

  • nixos-rebuild Command Examples in Linux
  • nixos-option: Command Examples in Linux
  • nixos-container : Command Examples in Linux
  • nitrogen Command Examples in Linux

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright