docker

hi

i try to build a spring boot application natively, i followed this tutorial: https://www.baeldung.com/spring-native-intro

I get this error

Connection to the Docker daemon at 'localhost' failed with error "[13] Permission denied"; ensure the Docker daemon is running and accessible

in console

groups
return
users docker

Hi
Is the docker service running?

Going forward, perhaps look at helm charts and kubernetes?

sudo systemctl status docker

● docker.service - Docker Application Container Engine
Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled; vendor preset: disabled)
Active: active (running) since Thu 2022-06-09 20:23:37 EDT; 2h 4min ago
Docs: http://docs.docker.com
Main PID: 444 (dockerd)
Tasks: 29
CPU: 27.087s
CGroup: /system.slice/docker.service
├─ 444 /usr/bin/dockerd --add-runtime oci=/usr/sbin/docker-runc
└─ 455 containerd --config /var/run/docker/containerd/containerd.toml --log-level warn

I get a different error if docker isn’t running:

 $ docker ps
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

Have you logged in again?

Show the output of:


printenv | grep DOCKER
cat /etc/docker/daemon.json
 

Hi
So that error is when as your user you try to run any docker command, eg docker ps docker run etc?

You added your user to the docker group and logged out logged in?

printenv | grep DOCKER
return nothing

cat /etc/docker/daemon.json

{

  "log-level": "warn",

  "log-driver": "json-file",

  "log-opts": {

    "max-size": "10m",

    "max-file": "5"

  }

}


ya i logged out of my kde session.

if i run with root that seem to work

Hi
So groups command shows your username and docker not users docker? If users then something is not right, it should be your username first.

No username is passed then this will display group membership for the current user

so
users and docker