This project offers two seperate images for building the plug-in using either released or local source code.
Since there are several issues with using alpine
based images we are using debian:stable-slim
for both our build and final image. The final image size is about 113 MB.
Documented issues:
The Dockerfiles utilize the multi-stage build feature provided by the Docker CLI.
This feature allows you to optimize the final image output by copying select artifacts from the previous stage.
The Dockerfile
in the /docker
directory compiles the plug-in using the specified PLUGIN_VERSION
source code. The source code will come directly from our GitHub Releases.
The Dockerfile
located in the root
(/
) directory will compile the plug-in using your local source code.
Both Dockerfiles compile mosquitto
using the source code from the version specified by MOSQUITTO_VERSION
.
Mosquitto released versions can be found at https://mosquitto.org/files/source/
The Dockerfiles will also copy conf
files found in the /docker/conf
directory. For your safety we have commented these instructions out, so you will have to uncomment the instructions for the files to be copied.
This is just a working example of how a docker image could be built for this project and composed with other images such as a redis
one for cache (check docker-compose). Any contributions to make it better are very welcome.