no more dockerfile, we're podmanning now :)
This commit is contained in:
50
apps/smarthome/Containerfile
Normal file
50
apps/smarthome/Containerfile
Normal file
@@ -0,0 +1,50 @@
|
||||
FROM node:current-buster
|
||||
|
||||
# Set the commit of Zwave2Mqtt to checkout when cloning the repo
|
||||
ENV Z2M_VERSION=9cc3740740b57f1e896139b5ffdb25be7576ad58
|
||||
ENV DEBIAN_FRONTEND noninteractive
|
||||
|
||||
#setup local apt cache
|
||||
#RUN sed -i 's@http://@http://apt-cache.lan/@g' /etc/apt/sources.list
|
||||
#/apt-cache
|
||||
|
||||
# Install required dependencies
|
||||
RUN apt update -y
|
||||
RUN apt full-upgrade -y
|
||||
|
||||
# Packages we need
|
||||
RUN apt install -y \
|
||||
socat libopenzwave1.5 npm git
|
||||
|
||||
# Clone Zwave2Mqtt build pkg files and move them to /dist/pkg
|
||||
RUN npm config set unsafe-perm true && npm install -g pkg
|
||||
RUN cd /root \
|
||||
&& git clone https://github.com/OpenZWave/Zwave2Mqtt.git \
|
||||
&& cd Zwave2Mqtt \
|
||||
&& git checkout ${Z2M_VERSION} \
|
||||
&& npm install \
|
||||
&& npm run build
|
||||
|
||||
# Clean up
|
||||
RUN apt autoremove -y
|
||||
RUN apt clean -y
|
||||
RUN rm -rf /root/*
|
||||
RUN apt-get clean -y
|
||||
RUN rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||
|
||||
COPY --from=build /dist/lib/ /lib/
|
||||
COPY --from=build /dist/pkg /usr/src/app
|
||||
|
||||
# supervisor base configuration
|
||||
ADD supervisor.conf /etc/supervisor.conf
|
||||
|
||||
LABEL maintainer="zoide"
|
||||
|
||||
# Set enviroment
|
||||
ENV LD_LIBRARY_PATH /lib
|
||||
|
||||
EXPOSE 8091
|
||||
|
||||
CMD ["supervisord", "-c", "/etc/supervisor.conf"]
|
||||
#CMD ["/usr/src/app/zwave2mqtt"]
|
||||
|
||||
Reference in New Issue
Block a user