Skip to content

Instantly share code, notes, and snippets.

@bblanchon
Last active October 18, 2015 16:51
Show Gist options
  • Save bblanchon/6ee1b4f2e5d3d75a19cc to your computer and use it in GitHub Desktop.
Save bblanchon/6ee1b4f2e5d3d75a19cc to your computer and use it in GitHub Desktop.
Dockerfile for Domoticz
# docker build -t bblanchon/domoticz .
# docker run --device /dev/ttyACM0 -p 80:8080 bblanchon/domoticz
FROM ubuntu:14.04
MAINTAINER bblanchon
# install dependencies
RUN apt-get update && \
apt-get install -y \
build-essential \
cmake \
curl \
git \
libboost-dev \
libboost-system-dev \
libboost-thread-dev \
libcurl4-openssl-dev \
libsqlite3-dev \
libssl-dev \
libudev-dev \
libusb-dev \
nano \
zlib1g-dev
# build OpenZWave static library
RUN cd /tmp && \
git clone --depth 1 https://github.com/OpenZWave/open-zwave.git && \
cd open-zwave && \
make && make install && \
cp libopenzwave.a /usr/local/lib/
# build domoticz
RUN cd && \
git clone --depth 1 https://github.com/domoticz/domoticz.git && \
cd domoticz && \
cmake -DCMAKE_BUILD_TYPE=Release . && \
make && make install
EXPOSE 8080
VOLUME ["/var/lib/domoticz"]
ENTRYPOINT ["/opt/domoticz/domoticz", "-dbase", "/var/lib/domoticz/domoticz.db"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment