Blame | Last modification | View Log | Download
Building Domoticz via DockerThis builder still a bit work on progress. It uses Docker to compile OpenZWave and Domoticz. To speed up the build process on macos and Windows it uses a persistent volume for the actual compilation. Currently it supports only builds to amd64 targets. Using `docker buildx` it should be possible to add architectures like Raspberry Pi.## PrerequisitesYou need to have docker-compose installed.To install docker-compose you can use the below instructions:### docker-compose installation ###```shellsudo apt install docker-composesudo usermod -aG docker ${USER}exit```## Initial SetupThe scripts expect that you've cloned OpenZWave repository besides Domoticz like:```shell$ git clone https://github.com/domoticz/domoticz.git dev-domoticz$ git clone --depth 1 https://github.com/domoticz/open-zwave.git```Then create the Docker image:```shell$ docker-compose -f dev-domoticz/build/docker-compose.yml build````This can take a while as it builds CMake and Boost from source.`## ConfigurationOptionally you can use `.env.example` as a template to create an `.env` file in the same directory:```iniHTTP_PORT=8080HTTPS_PORT=443# On Windows and macOS compilation typically will go faster with:CACHE_BIND_MOUNTS=YES# Configure CMake:USE_BUILTIN_JSONCPP=YESUSE_BUILTIN_MINIZIP=YESUSE_BUILTIN_MQTT=YESUSE_BUILTIN_SQLITE=YESUSE_PYTHON=YESINCLUDE_LINUX_I2C=YESINCLUDE_SPI=YESWITH_LIBUSB=YESUSE_LUA_STATIC=YESUSE_OPENSSL_STATIC=NOUSE_STATIC_OPENZWAVE=YESUSE_PRECOMPILED_HEADER=YESGIT_SUBMODULE=ON```Note that `USE_STATIC_BOOST` is not supported, it's always enabled.## Build DomiticzFirst generate the Domoticz Makefiles:```shell$ ./dev-domoticz/build/build cmake```Now you can build OpenZWave and Domoticz:```shell$ ./dev-domoticz/build/build compile$ ls -l dev-domoticz/domoticz-rwxr-xr-x 1 markr staff 17540712 21 feb 23:33 dev-domoticz/domoticz```For testing it can be useful to run Domoticz containerized:```shell$ ./dev-domoticz/build/build run```Open http://127.0.0.1:8080/ in your browser.## Usage```shell$ cd dev-domoticz/build$ ./buildUsage:build clean [-p openzwave | domoticz] # clean sourcebuild compile [-p openzwave | domoticz] # compile sourcebuild shell # run bash inside the containerOnly for Domoticz:build cmake # (re)creates Makefilesbuild run # run Domoticz for testingOnly for OpenZWave:build check # validates XML configuration filesbuild updateIndexDefinesbuild test```