mirror of
https://github.com/Koenkk/zigbee2mqtt.git
synced 2024-11-16 10:28:33 -07:00
22 lines
691 B
Docker
22 lines
691 B
Docker
FROM arm64v8/alpine:3.8
|
|
|
|
# Setup cross-build
|
|
ENV QEMU_EXECVE 1
|
|
COPY docker/qemu-aarch64-static /usr/bin
|
|
WORKDIR /app
|
|
|
|
# Write .hash.json
|
|
ARG COMMIT
|
|
RUN [ "qemu-aarch64-static", "/bin/sh", "-c", "echo {\\\"hash\\\": \\\"$COMMIT\\\"} > .hash.json" ]
|
|
|
|
# Copy files & install dependencies
|
|
ADD . /app
|
|
RUN [ "qemu-aarch64-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=8.11.4-r0 git && \
|
|
npm install --unsafe-perm && \
|
|
apk del make gcc g++ python linux-headers udev git"]
|
|
|
|
# Entrypoint
|
|
ENTRYPOINT ["./run.sh"] |