zigbee2mqtt/docker/Dockerfile.arm32v6
2019-09-17 19:59:58 +02:00

22 lines
686 B
Docker

FROM arm32v6/alpine:3.9
# Setup cross-build
ENV QEMU_EXECVE 1
COPY docker/qemu-arm-static /usr/bin
WORKDIR /app
# Write .hash.json
ARG COMMIT
RUN [ "qemu-arm-static", "/bin/sh", "-c", "echo {\\\"hash\\\": \\\"$COMMIT\\\"} > .hash.json" ]
# Copy files & install dependencies
ADD . /app
RUN [ "qemu-arm-static", "/bin/sh", "-c", \
"cp /app/data/configuration.yaml /app && \
cp /app/docker/run.sh /app && chmod +x /app/run.sh && \
apk add --update --no-cache make gcc g++ python linux-headers udev nodejs npm git && \
npm install --unsafe-perm --production && \
apk del make gcc g++ python linux-headers udev git"]
# Entrypoint
ENTRYPOINT ["./run.sh"]