From 774426524195c8f880fd49aa5450d44a97ec5209 Mon Sep 17 00:00:00 2001 From: vakius Date: Sun, 13 Jun 2021 18:17:11 +0300 Subject: [PATCH] Create Dockerfile --- Dockerfile | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..cf9a828 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,23 @@ +FROM ubuntu:latest as build +WORKDIR /tmp +RUN apt-get update && \ + apt-get -y install build-essential git libsystemd-dev && \ + git clone https://github.com/xorbit/LiFePO4wered-Pi.git && \ + cd LiFePO4wered-Pi && \ + make all USE_SYSTEMD=0 PREFIX=/usr + + +ARG BUILD_FROM=homeassistant/aarch64-base:latest +FROM $BUILD_FROM + +ENV LANG C.UTF-8 + +WORKDIR / +COPY --from=build /tmp/LiFePO4wered-Pi/build/liblifepo4wered.so /usr/lib/liblifepo4wered.so +COPY --from=build /tmp/LiFePO4wered-Pi/build/lifepo4wered-cli /usr/bin/lifepo4wered-cli +COPY --from=build /tmp/LiFePO4wered-Pi/build/lifepo4wered-daemon /usr/sbin/lifepo4wered-daemon +# COPY start.sh /app/start.sh +# ENTRYPOINT ["/app/start.sh"] +CMD lifepo4wered-daemon -f + +LABEL io.hass.version="VERSION" io.hass.type="addon" io.hass.arch="aarch64"