-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile.meter_grapher
65 lines (54 loc) · 1.58 KB
/
Dockerfile.meter_grapher
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#
# uIota Dockerfile
#
# The resulting image will contain everything needed to build uIota FW.
#
# Setup: (only needed once per Dockerfile change)
# 1. install docker, add yourself to docker group, enable docker, relogin
# 2. # docker build -t uiota-build .
#
# Usage:
# 3. cd to MeterLoggerWeb root
# 4. # docker run -t -i -p 8080:80 meterloggerweb:latest
FROM debian:buster
MAINTAINER Kristoffer Ek <stoffer@skulp.net>
RUN "echo" "deb http://http.us.debian.org/debian buster non-free" >> /etc/apt/sources.list
RUN apt-get update && apt-get install -y \
aptitude \
autoconf \
automake \
aptitude \
bash \
bison \
cpanplus \
flex \
g++ \
gawk \
gcc \
git \
inetutils-telnet \
joe \
make \
sed \
texinfo \
sudo \
screen \
rsync \
libdbd-mysql-perl \
libdbi-perl \
libconfig-simple-perl \
default-mysql-client
USER root
RUN PERL_MM_USE_DEFAULT=1 cpan install Math::Random::Secure
RUN PERL_MM_USE_DEFAULT=1 cpan install Net::MQTT::Simple
RUN PERL_MM_USE_DEFAULT=1 cpan install Statistics::Basic
RUN PERL_MM_USE_DEFAULT=1 cpan install Time::Format
RUN PERL_MM_USE_DEFAULT=1 cpan install Crypt::Mode::CBC
RUN PERL_MM_USE_DEFAULT=1 cpan install Redis
# we need a specific version here
RUN PERL_MM_USE_DEFAULT=1 cpanp -i http://cpan.metacpan.org/authors/id/M/MI/MIK/CryptX-0.036.tar.gz
COPY ./perl /etc/apache2/perl
COPY ./Nabovarme.conf /etc/
COPY ./mqtt_to_redis.pl /etc/apache2/perl/Nabovarme/bin/mqtt_to_redis.pl
COPY ./meter_grapher.pl /etc/apache2/perl/Nabovarme/bin/meter_grapher.pl
CMD /etc/apache2/perl/Nabovarme/bin/mqtt_to_redis.pl & /etc/apache2/perl/Nabovarme/bin/meter_grapher.pl