speedtest-to-influxdb2/entrypoint.sh
Marty Oehme 0d868c05fe
Move dependency installation to Dockerfile
Moved installation of speedtest commandline utility to Dockerfile.
Did not remove the (optional, if no cmdline utility found) installation
from entrypoint, so that the program can be run from entrypoint without
using docker as a fall-back.
2021-05-19 15:37:30 +02:00

15 lines
537 B
Bash

#!/bin/sh
printenv >>/etc/environment
ln -snf "/usr/share/zoneinfo/$TZ" /etc/localtime && echo "$TZ" >/etc/timezone
# Install speedtest-cli
if [ ! -e /usr/bin/speedtest ]; then
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 379CE192D401AB61
echo "deb https://ookla.bintray.com/debian buster main" | tee /etc/apt/sources.list.d/speedtest.list
apt-get update && apt-get -q -y install speedtest
apt-get -q -y autoremove && apt-get -q -y clean
rm -rf /var/lib/apt/lists/*
fi
exec /usr/local/bin/python3 "$@"