Open tobiasfaust opened 10 months ago
Does this Problem also persist with an up to date Image: ghcr.io/fhem/fhem-minimal-docker:3-bullseye
I´m afraid of that, its the same. I made fresh compilation:
FROM ghcr.io/fhem/fhem-minimal-docker:3-bullseye ENV AWS_CONFIG_FILE /run/secrets/aws_fhem_config ENV AWS_SHARED_CREDENTIALS_FILE /run/secrets/aws_fhem_credentials WORKDIR /tmp RUN apt-get update -y && \ apt-get upgrade -y && \ apt-get install -y nano cron awscli \ libmatch-simple-perl \ avahi-utils avahi-daemon libnss-mdns systemd && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
root@fhem:/tmp# /etc/init.d/avahi-daemon status Avahi mDNS/DNS-SD Daemon is not running root@fhem:/tmp# ls -ail /run/dbus/pid ls: cannot access '/run/dbus/pid': No such file or directory root@fhem:/tmp# root@fhem:/tmp# root@fhem:/tmp# dbus-daemon --system root@fhem:/tmp# /etc/init.d/avahi-daemon start Starting Avahi mDNS/DNS-SD Daemon: avahi-daemon. root@fhem:/tmp# root@fhem:/tmp# /etc/init.d/avahi-daemon status Avahi mDNS/DNS-SD Daemon is running
Can you explain the reason, why you need avahi inside FHEM container and why you are not using it seperate?
Overall i think the service ist not told to be started automatic ( systemctl ).
Hi, i need avahi insinde the container because i want use Text2speech module and airplay2 devices as enpoints. I´m using this instructions: https://forum.fhem.de/index.php?topic=119278.0 So the described play.sh script needs an avahi-browse funtionality to determine the right port of the given IP-device.
set myTTS tts [192.168.10.102] Hier kommt ein Test!
I dont want to change the play.sh script because it should be automaticly installed by fhem dockerfile from github
Maybe its possible to add custom start script?
I am not familar with avahi, but i think best is to run this deamon in a seperate container and use network communication, because running it inside the fhem container will not detect if the deamon isn't running.
But to run a custom start command for this deamon inside the FHEM omage you can use following options:
If something needs to be done only once during the first start of a fresh container you just created, like after upgrading to a new version of the FHEM Docker Image, the *-init.sh scripts are the right place:
/pre-init.sh, /docker/pre-init.sh
I think it is enough to run a update-rc.d avahi-daemon defaults
once, but i haven't tested it.
If something needs to be done every time you (re)start your container, the *-start.sh scripts are the right place:
/pre-start.sh, /docker/pre-start.sh
This script will be run every time the container starts, even before the FHEM Docker image's own startup preparations. FHEM will not yet be running at this point in time.
As an alternative to the first approach, you can run your init script manually from here: /etc/init.d/avahi-daemon status
One last note to your "apt upgrade" command. This will upgrade installed packages, but not overwrite the packages already installed in the fhem-minimal-docker:3-bullseye
image. So you are adding an extra layer which needs extra space.
The FHEM image itself is updated very often to not need this step on your side.
Hi, i need avahi-browse inside of Fhem Docker. So i need to install those packets:
apt-get install -y avahi-utils avahi-daemon libnss-mdns systemd
My Dockerfile:
My docker compose file:
After starting the docker the daemon didn´t start:
So I have to do the following steps for a proper working inside of docker:
Its a problem inside of the fhem docker why dbus is not startable? If not, how can i add a custom startscript to execute the needed steps after each container start?