1. Reasons
The docker process uses UNIX sockets instead of TCP ports. By default, UNIX socket belongs to root user, so it needs to Root privileges To access
2. Solutions
# Create a docker group sudo groupadd docker # Check if the current user is in the docker group sudo gpasswd -a $your_user_name docker # Add the current user to the docker group sudo gpasswd -a $USER docker # Update group information newgrp docker
3. Inspection results
docker version
Similar Posts:
- Docker-compose Run Error: Couldn’t connect to Docker daemon at http+docker://localhost – is it running?
- [Solved] Docker ERROR: Couldn’t connect to Docker daemon at http+docker://localunixsocket – is it running?
- Run Wireshark or tshark as a Non-Root User
- An error is reported when the docker command is executed in Jenkins
- A dependency job for docker.service failed
- [How to]docker http: server gave HTTP response to HTTPS client
- [Solved] Ubuntu mariadb root access denied after mysql_secure_installation
- ERROR 1044 (42000): Access denied for user ‘root’@’localhost’
- mysql 1142 – SELECT command denied to user ‘root_ssm’@’localhost’ for table …
- Exiting due to DRV_AS_ROOT: The “docker“ driver should not be used with root privileges.