forked from mqtt-tools/mqttwarn
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.full
36 lines (28 loc) · 829 Bytes
/
Dockerfile.full
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# Docker build file for mqttwarn.
# Based on https://github.com/pfichtner/docker-mqttwarn.
#
# Invoke like:
#
# docker build --tag=mqttwarn-local-full --file=Dockerfile.full .
#
FROM python:3.9-slim-buster
# Install additional requirements
# FIXME: Skip all packages needing compilation
#RUN apt-get update && apt-get install --yes librrd-dev
# Create /etc/mqttwarn
RUN mkdir -p /etc/mqttwarn
WORKDIR /etc/mqttwarn
# Add user "mqttwarn"
RUN groupadd -r mqttwarn && useradd -r -g mqttwarn mqttwarn
RUN chown -R mqttwarn:mqttwarn /etc/mqttwarn
# Install mqttwarn
COPY . /src
RUN pip install /src[all]
# Make process run as "mqttwarn" user
USER mqttwarn
# Use configuration file from host
VOLUME ["/etc/mqttwarn"]
# Set default configuration path
ENV MQTTWARNINI="/etc/mqttwarn/mqttwarn.ini"
# Invoke program
CMD mqttwarn