-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
48 lines (42 loc) · 1.19 KB
/
Dockerfile
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
FROM debian
ENV \
CRONJOB_ITERATION="30" \
MQTT_HOST="192.168.1.14" \
MQTT_PORT="1883" \
MQTT_TOPIC="Domek/speedtest" \
MQTT_OPTIONS="" \
SPEEDTEST_OPTIONS="--server-id=2198" \
ASUS_USER="" \
ASUS_PWD="" \
ASUS_IP="" \
ASUS_PORT=""
RUN apt-get update
RUN apt-get install -y \
gnupg1 \
apt-transport-https \
dirmngr \
lsb-release \
mosquitto-clients \
jq \
ssh \
bash \
cron \
sshpass \
bc
RUN export INSTALL_KEY=379CE192D401AB61 && \
export DEB_DISTRO=$(lsb_release -sc) && \
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys $INSTALL_KEY && \
echo "deb https://ookla.bintray.com/debian ${DEB_DISTRO} main" | tee /etc/apt/sources.list.d/speedtest.list
RUN apt-get update
RUN apt-get install speedtest
RUN mkdir /var/speedtest
RUN mkdir /var/speedtest/config
RUN mkdir /var/speedtest/scripts
RUN touch /var/log/cron.log
ADD ./scripts/. /var/speedtest/scripts/
ADD ./config/. /var/speedtest/config/
RUN chmod 777 /var/speedtest/scripts/speedtest.sh
RUN chmod 777 /var/speedtest/scripts/wanspeed.sh
RUN chmod 777 /var/speedtest/config/run.sh
RUN chmod 777 /var/log/cron.log
CMD [ "/var/speedtest/config/run.sh" ]