• 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. startx: command not found
  2. avahi-browse: command not found
  3. nova Command Examples in Linux
  4. dsniff Command Examples in Linux
  5. Rpm: Error While Loading Shared Libraries: Libz.so.1: Cannot Open Shared Object File: No Such File
  6. How to set “max_report_luns” and “max_luns” on CentOS/RHEL 7 to scan more than 16,383 LUNs
  7. semanage Command Examples in Linux
  8. How systemd-tmpfiles cleans up /tmp/ or /var/tmp (replacement of tmpwatch) in CentOS / RHEL 7
  9. fcrackzip: command not found
  10. Monitor HDD and SSD with smartd and smartctl

You May Also Like

Primary Sidebar

Recent Posts

  • batch: Execute commands at a later time when the system load levels permit
  • bat: Print and concatenate files
  • bastet: Clone of the game Tetris in the terminal
  • bashmarks: Save and jump to commonly used directories using 1 character commands

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright