Zayn777 commited on
Commit
e19575f
·
verified ·
1 Parent(s): 934398c

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +8 -4
Dockerfile CHANGED
@@ -20,12 +20,16 @@ RUN chmod 777 /var/cache/nginx && \
20
  COPY --from=neoapi /neo-api /neo-api
21
  COPY --from=neoapi /data /data
22
 
23
-
24
-
 
 
 
 
25
  # 复制配置文件
26
  COPY nginx.conf /etc/nginx/nginx.conf
27
  COPY start.sh /start.sh
28
- RUN chmod +x /start.sh && \
29
- chmod 777 /neo-api
30
 
31
  CMD ["/start.sh"]
 
20
  COPY --from=neoapi /neo-api /neo-api
21
  COPY --from=neoapi /data /data
22
 
23
+ # 确保neo-api有执行权限 - 改进这一部分
24
+ RUN if [ -f /neo-api ]; then \
25
+ chmod +x /neo-api; \
26
+ elif [ -d /neo-api ]; then \
27
+ find /neo-api -type f -exec chmod +x {} \; ; \
28
+ fi
29
  # 复制配置文件
30
  COPY nginx.conf /etc/nginx/nginx.conf
31
  COPY start.sh /start.sh
32
+ RUN chmod +x /start.sh
33
+
34
 
35
  CMD ["/start.sh"]