diff --git a/c-mqtt-forwarder.Dockerfile b/c-mqtt-forwarder.Dockerfile new file mode 100644 index 0000000..c20873a --- /dev/null +++ b/c-mqtt-forwarder.Dockerfile @@ -0,0 +1,153 @@ +# docker build --no-cache --progress=plain -t tobi312/tools:c-mqtt-forwarder -f c-mqtt-forwarder.Dockerfile . +FROM alpine:latest AS builder + +ARG VERSION=1.0.0 + +RUN \ + apk update ; \ + apk add --no-cache --virtual .build-deps \ + build-base \ + cmake \ + git \ + mosquitto-dev \ + util-linux-dev \ + uthash-dev \ + cjson-dev \ + linux-headers \ + libuuid \ + pcre-dev \ + ; \ + echo "Build requirements installed!" + +WORKDIR /usr/src/ + +RUN \ + #git clone --branch ${VERSION} --single-branch https://git.ypbind.de/repository/c-mqtt-forwarder.git c-mqtt-forwarder + wget -qO- https://git.ypbind.de/cgit/c-mqtt-forwarder/snapshot/c-mqtt-forwarder-${VERSION}.tar.gz | tar xzv ; mv c-mqtt-forwarder-${VERSION} c-mqtt-forwarder + +WORKDIR /usr/src/c-mqtt-forwarder + +RUN cmake . ; \ + make ; \ + make install + +COPY <