docker-avahi/README.md
2025-01-18 14:40:31 +08:00

61 lines
1.3 KiB
Markdown

# Come installare
per installare usare docker-compose
```docker-compose.yaml
services:
avahi:
image: ydkn/avahi
hostname: OrangePiSMB
network_mode: host
volumes:
- /home/orangepi/dockerfiles/avahi-services:/etc/avahi/services:ro
restart: unless-stopped
```
editare il file sudo nano /home/orangepi/dockerfiles/avahi-services/smb.service
```avahi-services/smb.service
<?xml version="1.0" standalone='no'?>
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
<name replace-wildcards="yes">%h</name>
<service>
<type>_smb._tcp</type>
<port>445</port>
</service>
</service-group>
```
far ripartire il docker
volendo si può creare l'immagine anche utilizzando il Dokerfile
```
sudo docker build -t ydkn/avahi .
```
# Originale
______________________________________________
# Avahi Docker Image
## Configuration
Put your service definition files in a directory and mount it as a volume to _/etc/avahi/services_.
### Options
Configuration is done through environment variables.
- **ALLOW_INTERFACES** set _allow-interfaces_ in avahi-daemon.conf
- **DENY_INTERFACES** set _deny-interfaces_ in avahi-daemon.conf
## Start the container
```bash
docker run -d --restart always \
--net=host \
-e ALLOW_INTERFACES=eth0 \
-v $(pwd)/services:/etc/avahi/services \
ydkn/avahi:latest
```