BadApple9 / speedtest-x

A self-hosted speedtest appilication with an awesome test result datasheet.
GNU Lesser General Public License v2.1
1.76k stars 409 forks source link

结果页仍然不能显示 #55

Closed luckiestone closed 1 year ago

luckiestone commented 1 year ago

拉取的是最新的docker镜像,但是并没有解决问题 https://github.com/BadApple9/speedtest-x/issues/47 查看results.html 34行内为https://lf26-cdn-tos.bytecdntp.com/cdn/expire-1-M/layui/2.5.7/layui.js,尝试通过映射/var/www/html到宿主机,更改34行内为https://www.layuicdn.com/layui/layui.js(该链接有效),但是容器重启后宿主机的results.html会被重置。

BadApple9 commented 1 year ago

你拉取的并不是最新镜像。

最新镜像的 results.html 中已不包含 https://lf26-cdn-tos.bytecdntp.com/cdn/expire-1-M/layui/2.5.7/layui.js 该资源。

请贴一下您的镜像拉取命令。

luckiestone commented 1 year ago

docker run -dit --restart always --name speedtest-x -p 18080:80 -v /root/speedtestx/html:/var/www/html -it badapple9/speedtest-x

BadApple9 commented 1 year ago

docker run -dit --restart always --name speedtest-x -p 18080:80 -v /root/speedtestx/html:/var/www/html -it badapple9/speedtest-x

这个是容器运行命令,我猜测您本地的镜像可能是以前的镜像,你可以运行 docker image list 查看一下镜像的创建时间。

luckiestone commented 1 year ago

我是容器运行直接拉取的,这个机器是今年底才安装的,按理说拉取的肯定是最新的。但是docker image list为: badapple9/speedtest-x latest 5151bb58fbaa 14 months ago 495MB docker pull又显示最新:

latest: Pulling from badapple9/speedtest-x
Digest: sha256:9ae8a9ce6c30bd5629bd27923fdfea5718918ef244699c7f3be338de2da45ecd
Status: Image is up to date for badapple9/speedtest-x:latest
docker.io/badapple9/speedtest-x:latest
BadApple9 commented 1 year ago

我是容器运行直接拉取的,这个机器是今年底才安装的,按理说拉取的肯定是最新的。但是docker image list为: badapple9/speedtest-x latest 5151bb58fbaa 14 months ago 495MB docker pull又显示最新:

latest: Pulling from badapple9/speedtest-x
Digest: sha256:9ae8a9ce6c30bd5629bd27923fdfea5718918ef244699c7f3be338de2da45ecd
Status: Image is up to date for badapple9/speedtest-x:latest
docker.io/badapple9/speedtest-x:latest

删除现有镜像 docker rmi 5151bb58fbaa,并重新拉取 docker pull badapple9/speedtest-x:latest 试试

luckiestone commented 1 year ago

非常感谢,尝试了各种方式包括rmi删除再pull,最终发现是docker镜像源的问题,把镜像源删了就能拉到新的了。