Spaces:
Runtime error
Runtime error
# 使用官方的 nginx 镜像作为基础镜像 | |
FROM nginx:alpine | |
# 设置时区环境变量 | |
ENV TZ=Asia/Shanghai | |
# 安装必要的软件包 | |
RUN apk add --no-cache curl | |
# 下载 librespeed 前端文件 | |
RUN curl -L https://github.com/librespeed/speedtest/archive/refs/tags/v5.4.1.tar.gz | tar xz -C /usr/share/nginx/html --strip-components=1 | |
# 设置 nginx 配置 | |
COPY nginx.conf /etc/nginx/nginx.conf | |
# 暴露端口 | |
EXPOSE 80 | |
# 启动 nginx | |
CMD ["nginx", "-g", "daemon off;"] |