switch to tini
This commit is contained in:
parent
bbedb041f2
commit
a3c25670bc
3 changed files with 19 additions and 2 deletions
11
Dockerfile
11
Dockerfile
|
@ -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
7
docker-entrypoint.sh
Executable file
|
@ -0,0 +1,7 @@
|
|||
#!/bin/sh -e
|
||||
|
||||
# set environment
|
||||
export HOME=/tmp
|
||||
|
||||
# run
|
||||
exec $@
|
3
service/avahi/run
Executable file
3
service/avahi/run
Executable file
|
@ -0,0 +1,3 @@
|
|||
#!/bin/sh -e
|
||||
|
||||
/usr/sbin/avahi-daemon
|
Loading…
Reference in a new issue