wodby/docker4drupal

Fedora 37, part of containers didn't start since permissions denied

devbranch-bit opened this issue · 2 comments

Describe your issue
The php, traefik, node and crond containers won't start, but the others worked normally.

Output of docker info

Client:
 Context:    default
 Debug Mode: false

Server:
 Containers: 9
  Running: 5
  Paused: 0
  Stopped: 4
 Images: 8
 Server Version: 20.10.20
 Storage Driver: btrfs
  Build Version: Btrfs v5.18
  Library Version: 102
 Logging Driver: journald
 Cgroup Driver: systemd
 Cgroup Version: 2
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 io.containerd.runtime.v1.linux runc
 Default Runtime: runc
 Init Binary: /usr/libexec/docker/docker-init
 containerd version: 
 runc version: 
 init version: 
 Security Options:
  seccomp
   Profile: default
  selinux
  cgroupns
 Kernel Version: 6.0.10-300.fc37.x86_64
 Operating System: Fedora Linux 37 (Workstation Edition)
 OSType: linux
 Architecture: x86_64
 CPUs: 16
 Total Memory: 13.5GiB
 Name: fedora
 ID: TMA7:RFGD:TLC3:UINE:CQL4:JWBR:BQHG:5NSF:Q3KV:M2WB:6UFN:G7QN
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Registry: https://index.docker.io/v1/
 Labels:
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: true

Logs output docker-compose logs

traefik_1  | time="2022-12-05T11:06:12Z" level=error msg="Failed to retrieve information of the docker client and server host: 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.24/version: dial unix /var/run/docker.sock: connect: permission denied" providerName=docker
traefik_1  | time="2022-12-05T11:06:12Z" level=error msg="Provider connection error 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.24/version: dial unix /var/run/docker.sock: connect: permission denied, retrying in 14.791340531s" providerName=docker

Additional info

[root@fedora docker_local]# ls -la /var/run/docker.sock 
srw-rw-rw-. 1 root docker 0 Dec  5  2022 /var/run/docker.sock

Sounds like a docker permissions issue, not related to the docker4drupal images. You probably need to add your user to the docker group

Fixed by removing docker & docker-compose (were installed via yum), and installing those packages through bins from official repos., also configuring the permissions and user group.