We don't need Golang images to run the pre-built binary so I switched it to Alpine which is a lot smaller.
I had to switch to an Alpine builder image as well since it would be incompatible otherwise and bumped the golang environment version there to 1.20.3.
I'd say the reduction in size is well worth it.
Note: the images are local, they aren't pushed to any repository
Results:
speedtest-cli ❯ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
czechbol/orig-librespeed latest 74fa60a3e391 2 minutes ago 890MB
czechbol/new-librespeed latest 12806146233a 15 seconds ago 14.3MB
speedtest-cli ❯ docker run -it --rm czechbol/new-librespeed:latest
Retrieving server list from https://librespeed.org/backend-servers/servers.php
Selecting the fastest server based on ping
Selected server: Virginia, United States, OVH [speed.riverside.rocks]
Sponsored by: Riverside Rocks @ https://riverside.rocks
You're testing from: {"processedString":"<redacted> - Unknown ISP","rawIspInfo":""}
Ping: 12.00 ms Jitter: 3.66 ms
Download rate: 75.53 Mbps
Upload rate: 68.28 Mbps
We don't need Golang images to run the pre-built binary so I switched it to Alpine which is a lot smaller.
I had to switch to an Alpine builder image as well since it would be incompatible otherwise and bumped the golang environment version there to 1.20.3.
I'd say the reduction in size is well worth it.
Note: the images are local, they aren't pushed to any repository
Results: