Hello everybody,
I’m trying to install multiple docker containers via docker compose using a smb share as my bind volume. For example I try to use Pi-Hole (but other containers have had the same problem as well). I used this compose:
services:
pihole:
container_name: pihole
image: pihole/pihole:latest
ports:
- "53:53/tcp"
- "53:53/udp"
- "4002:443/tcp"
environment:
TZ: 'Europe/Berlin'
FTLCONF_webserver_api_password: 'test1234'
FTLCONF_dns_listeningMode: 'all'
volumes:
- './config/data:/etc/pihole'
cap_add:
- SYS_TIME
- SYS_NICE
restart: unless-stopped
The folder config/data is an smb share I automaticlly mount with fstab:
# Pi-Hole Docker Share
//IP/Databases/Pi-Hole /opt/Pi-Hole/config/data cifs credentials=/etc/samba/admin_credentials,noperm 0 0
When i try to load the container it starts but some files are broken for example the gravity.db has 0 bytes, but the share itself is wrightable since other files get written just fine. The credentials for my smb share also have full access rights. When I bind the volume to a local path all works fine so it’s not the config. Could this be a permission or ownership problem?
Can anyone help me how to correctly use smb shares as bind volumes?