-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathDockerfile
28 lines (25 loc) · 1.29 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
FROM homebridge/homebridge:2023-12-30
# Relocate homebridge working directory so it can be persisted
RUN find /etc/s6-overlay/ -type f | xargs sed -i -E 's:([ "])/homebridge:\1/config:g'
# add bashio
ADD https://github.com/hassio-addons/bashio/archive/v0.16.0.tar.gz /tmp/bashio.tar.gz
RUN apt-get update \
&& apt-get install --no-install-recommends -y curl jq \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
&& mkdir /tmp/bashio \
&& tar zxvf \
/tmp/bashio.tar.gz \
--strip 1 -C /tmp/bashio \
\
&& mv /tmp/bashio/lib /usr/lib/bashio \
&& ln -s /usr/lib/bashio/bashio /usr/bin/bashio
# Add the nice banner
ADD https://raw.githubusercontent.com/hassio-addons/addon-debian-base/v5.1.0/base/rootfs/etc/cont-init.d/00-banner.sh /etc/s6-overlay/s6-rc.d/banner/
RUN mkdir -p /etc/s6-overlay/s6-rc.d/banner && \
echo "oneshot" > /etc/s6-overlay/s6-rc.d/banner/type && \
echo "/etc/s6-overlay/s6-rc.d/banner/script" > /etc/s6-overlay/s6-rc.d/banner/up && \
touch /etc/s6-overlay/s6-rc.d/user/contents.d/banner && \
mv /etc/s6-overlay/s6-rc.d/banner/00-banner.sh /etc/s6-overlay/s6-rc.d/banner/script && \
chmod +x /etc/s6-overlay/s6-rc.d/banner/script && \
sed -i '1 s/^.*$/#!\/command\/with-contenv bashio/' /etc/s6-overlay/s6-rc.d/banner/script