Cannot run it on Alpine container
Closed this issue ยท 6 comments
I'm installing it on an Alpine Docker container:
docker run -it --rm alpine:3.14
apk add --no-cache --update -X "https://dl-cdn.alpinelinux.org/alpine/edge/testing" speedtest-go
Running it with:
speedtest-go
It fails with:
WARN[0000] No config file found in search paths, using default values
INFO[0000] Fetched server coordinates: 48.856700, 2.349700
FATA[0000] Error opening NotoSansDisplay-Light font: open assets/NotoSansDisplay-Light.ttf: no such file or directory
Maybe this is due to the way it's packaged on the Alpine testing branch though, I'm not sure.
EDIT: Maybe you could use Go 1.16's embed feature to bundle all the files in the binary? That would certainly help!
Sorry for the late reply, been too busy IRL.
It's erroring out because it can't find the font files. I'll see what I can do with these assets.
Nice ๐ I think it's moving forward but I get:
WARN[0000] No config file found in search paths, using default values
INFO[0000] Fetched server coordinates: 45.508800, -73.587800
WARN[0000] Configured asset path does not exist or is not a directory, using default assets
INFO[0000] Starting backend server on :8989
Is the Configured asset path does not exist or is not a directory, using default assets
expected?
I also made #30 and #29 to push the everything-in-the-binary even further, with an aim to run it on a scratch Docker image ๐ I may do a few PRs, it's a fun project ๐
Yes, that's expected, the default assets are now embedded into the binary, but you can also provide your own frontend in the assets
folder if you wish.
And thanks for your PR, I saw the email and thought it was an issue, and just added those to the code, so I'll close the PRs.
Thanks a lot for your great suggestions! :)
just added those to the code, so I'll close the PRs.
No problem! I'll definitely toy with the project this weekend ๐
I think we can close this. Maybe would you mind making a new release tag? I think a bunch of us would be happy not to have directories together with the binary ๐ค
Of course, I'll tag a new release later today