Giter Club home page Giter Club logo

Comments (5)

sidey79 avatar sidey79 commented on September 26, 2024

Does this Problem also persist with an up to date Image: ghcr.io/fhem/fhem-minimal-docker:3-bullseye

from fhem-docker.

tobiasfaust avatar tobiasfaust commented on September 26, 2024

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

from fhem-docker.

sidey79 avatar sidey79 commented on September 26, 2024

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 ).

from fhem-docker.

tobiasfaust avatar tobiasfaust commented on September 26, 2024

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?

from fhem-docker.

sidey79 avatar sidey79 commented on September 26, 2024

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:

Option 1

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.

Option 2

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.

from fhem-docker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.