Created
November 29, 2020 12:01
-
-
Save henrywhitaker3/c6663036a0ae4355843c34cb84859d97 to your computer and use it in GitHub Desktop.
Raspberry Pi Speedtest-Builder
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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