web525 commited on
Commit
ae720a6
·
1 Parent(s): 4c3f291
Files changed (2) hide show
  1. Dockerfile +2 -5
  2. start.sh +1 -4
Dockerfile CHANGED
@@ -1,16 +1,13 @@
1
  FROM chaoszhu/easynode:latest
2
 
3
  # 安装Nginx
 
4
  RUN apk update && apk add --no-cache nginx
5
 
6
- # 创建Nginx配置文件
7
  COPY nginx.conf /etc/nginx/nginx.conf
8
-
9
- # 创建启动脚本
10
  COPY start.sh /start.sh
11
  RUN chmod +x /start.sh
12
 
13
- # 不修改用户权限,使用基础镜像的默认用户
14
-
15
  EXPOSE 7860
16
  CMD ["/start.sh"]
 
1
  FROM chaoszhu/easynode:latest
2
 
3
  # 安装Nginx
4
+ USER root
5
  RUN apk update && apk add --no-cache nginx
6
 
7
+ # 复制配置文件
8
  COPY nginx.conf /etc/nginx/nginx.conf
 
 
9
  COPY start.sh /start.sh
10
  RUN chmod +x /start.sh
11
 
 
 
12
  EXPOSE 7860
13
  CMD ["/start.sh"]
start.sh CHANGED
@@ -1,8 +1,5 @@
1
- #!/bin/bash
2
  # 启动EasyNode
3
- echo "Starting EasyNode..."
4
  node /easynode/app/index.js --port 8082 &
5
-
6
  # 启动Nginx
7
- echo "Starting Nginx..."
8
  nginx -g "daemon off;"
 
1
+ #!/bin/sh
2
  # 启动EasyNode
 
3
  node /easynode/app/index.js --port 8082 &
 
4
  # 启动Nginx
 
5
  nginx -g "daemon off;"