docker-homebridge/Dockerfile
nyyu 99d4a6b3df
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
fix: version
2024-05-02 09:50:34 +02:00

51 lines
2.1 KiB
Docker

FROM debian:stable-slim
# renovate: datasource=github-releases depName=just-containers/s6-overlay
ENV S6_OVERLAY_VERSION=3.1.6.2 \
S6_CMD_WAIT_FOR_SERVICES_MAXTIME=0 \
S6_KEEP_ENV=1 \
USER=root \
# renovate: datasource=github-releases depName=homebridge/homebridge-apt-pkg
HOMEBRIDGE_PKG_VERSION=1.2.1 \
HOMEBRIDGE_APT_PACKAGE=1 \
UIX_CUSTOM_PLUGIN_PATH="/var/lib/homebridge/node_modules" \
PATH="/opt/homebridge/bin:/var/lib/homebridge/node_modules/.bin:$PATH" \
HOME="/home/homebridge" \
npm_config_prefix=/opt/homebridge
RUN apt-get update && apt-get upgrade \
&& apt-get install --no-install-recommends -y curl psmisc procps iputils-ping \
ca-certificates jq net-tools xz-utils \
&& chmod 4755 /bin/ping \
&& apt-get clean \
&& rm -rf /tmp/* /var/lib/apt/lists/* /var/tmp/* \
&& case "$(uname -m)" in \
x86_64) S6_ARCH='x86_64';; \
armv7l) S6_ARCH='armhf';; \
aarch64) S6_ARCH='aarch64';; \
*) echo "unsupported architecture"; exit 1 ;; \
esac \
&& curl -SLf https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-noarch.tar.xz | tar -C / -Jxpf - \
&& curl -SLf https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-${S6_ARCH}.tar.xz | tar -C / -Jxpf - \
&& case "$(uname -m)" in \
x86_64) DEB_ARCH='amd64';; \
armv7l) DEB_ARCH='armhf';; \
aarch64) DEB_ARCH='arm64';; \
*) echo "unsupported architecture"; exit 1 ;; \
esac \
&& curl -sSLf -o /homebridge_${HOMEBRIDGE_PKG_VERSION}.deb https://github.com/homebridge/homebridge-apt-pkg/releases/download/v${HOMEBRIDGE_PKG_VERSION}/homebridge_v${HOMEBRIDGE_PKG_VERSION}_${DEB_ARCH}.deb \
&& dpkg --force-all -i /homebridge_${HOMEBRIDGE_PKG_VERSION}.deb \
&& rm -rf /homebridge_${HOMEBRIDGE_PKG_VERSION}.deb \
&& chown -R root:root /opt/homebridge \
&& rm -rf /var/lib/homebridge \
&& rm -rf /opt/homebridge/include
# && find /opt/homebridge -regextype posix-egrep -regex ".*/node_modules/.*/(src|source|build|\.github|.*\.map)" -exec rm -rf {} +;
COPY rootfs /
EXPOSE 8581/tcp
VOLUME /homebridge
WORKDIR /homebridge
ENTRYPOINT [ "/init" ]