• 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 enable IPv6 on CentOS / RHEL 7
  2. How to move /var on a separate disk as a separate mount point (Online)
  3. Starting udev: udevd inotify_init failed: too many open files
  4. CentOS / RHEL 7 : How to disable Transparent Huge pages (THP)
  5. CentOS / RHEL 7 : How to Reset root password
  6. CentOS / RHEL 7 : Booting process
  7. What are different Samba Server Types
  8. groupmod Command Examples in Linux
  9. How to Reduce an LVM volume on Ubuntu
  10. What is the purpose of “system user” in MySQL Replication

You May Also Like

Primary Sidebar

Recent Posts

  • JavaFX ComboBox: Set a value to the combo box
  • Nginx load balancing
  • nginx 504 gateway time-out
  • Images preview with ngx_http_image_filter_module

© 2022 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright