Skip to content

Instantly share code, notes, and snippets.

@henrywhitaker3
Created November 29, 2020 12:01
Show Gist options
  • Save henrywhitaker3/c6663036a0ae4355843c34cb84859d97 to your computer and use it in GitHub Desktop.
Save henrywhitaker3/c6663036a0ae4355843c34cb84859d97 to your computer and use it in GitHub Desktop.
Raspberry Pi Speedtest-Builder
#!/bin/bash
branch=docker
tag=latest
if [ $# -gt 0 ]; then
if [ $1 == '--dev' ]; then
echo 'Using the develop branch'
branch=dev-docker
tag=dev
fi
fi
# Clone the repo
git clone https://github.com/henrywhitaker3/Speedtest-Tracker
cd Speedtest-Tracker
git checkout $branch
# Download the correct Ookla binary
sed -i 's/1\.0\.0-x86_64/1\.0\.0-arm/' conf/etc/cont-init.d/50-speedtest
# Build image
docker build . -f Dockerfile --tag=henrywhitaker3/speedtest-tracker:$tag
# Clear up stuff
cd ..
rm -rf Speedtest-Tracker
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment