jetlan commited on
Commit
02d6bc8
·
verified ·
1 Parent(s): 2b9bb2c

Delete Dockerfile.txt

Browse files
Files changed (1) hide show
  1. Dockerfile.txt +0 -24
Dockerfile.txt DELETED
@@ -1,24 +0,0 @@
1
- # 使用官方nginx镜像作为基础
2
- FROM nginx:alpine
3
-
4
- # 设置维护者信息
5
- LABEL maintainer="dev@example.com"
6
-
7
- # 删除默认的nginx欢迎页面
8
- RUN rm -rf /usr/share/nginx/html/*
9
-
10
- # 修改nginx配置以监听端口10080
11
- RUN sed -i 's/listen\(.*\)80;/listen 10080;/g' /etc/nginx/conf.d/default.conf
12
-
13
- # 创建自定义的测试静态页面
14
- COPY index.html /usr/share/nginx/html/
15
-
16
- # 健康检查
17
- HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
18
- CMD wget --no-verbose --tries=1 --spider http://localhost:10080/ || exit 1
19
-
20
- # 暴露端口10080
21
- EXPOSE 10080
22
-
23
- # 启动nginx(前台运行)
24
- CMD ["nginx", "-g", "daemon off;"]