Download Dockerfile.txt from jetlan/ems: direct link, hf CLI and curl.
- Browser
- Download file 651 Bytes
-
https://huggingface.co/spaces/jetlan/ems/resolve/main/Dockerfile.txt
- Command line
-
hf download hf://spaces/jetlan/ems/Dockerfile.txt
-
curl -L -o Dockerfile.txt https://huggingface.co/spaces/jetlan/ems/resolve/main/Dockerfile.txt
651 Bytes
| # 使用官方nginx镜像作为基础 | |
| FROM nginx:alpine | |
| # 设置维护者信息 | |
| LABEL maintainer="dev@example.com" | |
| # 删除默认的nginx欢迎页面 | |
| RUN rm -rf /usr/share/nginx/html/* | |
| # 修改nginx配置以监听端口10080 | |
| RUN sed -i 's/listen\(.*\)80;/listen 10080;/g' /etc/nginx/conf.d/default.conf | |
| # 创建自定义的测试静态页面 | |
| COPY index.html /usr/share/nginx/html/ | |
| # 健康检查 | |
| HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \ | |
| CMD wget --no-verbose --tries=1 --spider http://localhost:10080/ || exit 1 | |
| # 暴露端口10080 | |
| EXPOSE 10080 | |
| # 启动nginx(前台运行) | |
| CMD ["nginx", "-g", "daemon off;"] |