Docker Commands and issues Episode: 2

Docker Commands and issues Episode: 2

Table of Contents

Docker Commands and issues Episode: 2

atuld@EITS/frappe_docker$ docker compose -f pwd.yml up -d
WARN[0000] /home/atuld/Desktop/GennextIT/MEP-ERP/frappe/EITS/frappe_docker/pwd.yml: the attribute `version` is obsolete, it will be ignored, please remove it to avoid potential confusion 
unable to get image 'mariadb:10.6': permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get "http://%2Fvar%2Frun%2Fdocker.sock/v1.49/images/mariadb:10.6/json": dial unix /var/run/docker.sock: connect: permission denied

Solution:

The error you're encountering is a classic Docker permission issue! Your user doesn't have permission to access the Docker daemon socket. Here are a few ways to fix this:

## Quick Fix (Current Session)
```bash
sudo docker compose -f pwd.yml up -d

Permanent Fix (Add user to docker group)

# Add your user to the docker group
sudo usermod -aG docker $USER

# Apply the group changes (you'll need to log out and back in, or use newgrp)
newgrp docker

# Or alternatively, restart your session completely

After adding yourself to the docker group, you can verify it worked:

# Check if you're in the docker group
groups

# Test docker without sudo
docker --version

Alternative: Check Docker Service Status

Sometimes the issue is that Docker isn’t running:

# Check if Docker is running
sudo systemctl status docker

# Start Docker if it's not running
sudo systemctl start docker

# Enable Docker to start on boot
sudo systemctl enable docker

Pop!_OS Specific Note

Since you’re on Pop!_OS, make sure Docker is properly installed. If you installed it via apt, the setup should be standard. If you’re using Flatpak or another method, the permissions might be different.

Try the sudo usermod -aG docker $USER approach first, then log out and back in. That should resolve the permission denied error permanently.

To stop all the running container

docker stop $(docker ps -q)
Tags :