switch to tini

This commit is contained in:
Florian Schwab 2018-11-15 00:43:40 +01:00
parent bbedb041f2
commit a3c25670bc
3 changed files with 19 additions and 2 deletions

View file

@ -5,13 +5,20 @@ MAINTAINER Florian Schwab <me@ydkn.de>
RUN apk --no-cache --no-progress upgrade
# install avahi
RUN apk --no-cache --no-progress add avahi avahi-tools
RUN apk --no-cache --no-progress add runit tini avahi avahi-tools
# disable d-bus
RUN sed -i 's/.*enable-dbus.*/enable-dbus=no/' /etc/avahi/avahi-daemon.conf
# copy scripts
COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
COPY service /etc/service
# volumes
VOLUME ["/etc/avahi"]
# entrypoint
ENTRYPOINT ["tini", "--", "docker-entrypoint.sh"]
# default command
CMD ["avahi-daemon"]
CMD ["runsvdir", "/etc/service"]

7
docker-entrypoint.sh Executable file
View file

@ -0,0 +1,7 @@
#!/bin/sh -e
# set environment
export HOME=/tmp
# run
exec $@

3
service/avahi/run Executable file
View file

@ -0,0 +1,3 @@
#!/bin/sh -e
/usr/sbin/avahi-daemon