HomarrH
Homarr8mo ago
10 replies
Murd

Docker integration works, but....it shouldn't?

Heyas, I've got a homarr container running in my homelab and it's all working wonderfully. I've got users created for each container, bind mounts set with appropriate user and group perms, everything working well. What's confusing me though is that the docker integration is working (via adding /var/run/docker.sock as a mounted volume), when I don't think it should be - I haven't added the homarr user into the docker group...

Below a snippet of my compose.
If there are indentation errors please ignore, it's a copy paste artefact. This is working,
  homarr:
    image: ghcr.io/ajnart/homarr:latest
    container_name: homarr
    hostname: homarr
    extra_hosts: *host-server
    restart: unless-stopped
    networks:
      - core_services_net
      - media_net
    ports:
      - 7575:7575
    environment:
      PUID: 1019
      PGID: 1019
      TZ: Australia/Melbourne
      DISABLE_ANALYTICS: TRUE
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock # Optional, only if you want docker integration
      - /dockers/homarr/configs:/app/data/configs
      - /dockers/homarr/icons:/app/public/icons
      - /dockers/homarr/data:/data


and here's the perms on the host system:
# directory showing container is writing files as homarr (1019) user
~$ ls -la /dockers/homarr/
<snip>
drwxrwx---  2 homarr homarr 4096 Jul  5  2024 configs
drwxrwx---  2 homarr homarr 4096 Jun 11 09:31 data
drwxrwx---  2 homarr homarr 4096 Jul  5  2024 icons


# no homarr user in the docker group
~$ grep 'homarr\|docker' /etc/group
docker:x:984:cliaz
homarr:x:1019:cliaz

# the permissions of docker.sock, showing that the Others octal is 0
~$ namei -m /var/run/docker.sock
f: /var/run/docker.sock
 drwxr-xr-x /
 drwxr-xr-x var
 lrwxrwxrwx run -> /run
   drwxr-xr-x /
   drwxr-xr-x run
 srw-rw---- docker.sock
~$ stat -c "%a %n" /var/run/docker.sock
660 /var/run/docker.sock


Is there something I'm missing here?
Host is Ubuntu 24.04 LTS, Homarr version 0.15.10
Was this page helpful?