asemxin commited on
Commit
cc50d8e
·
1 Parent(s): c4b264a

Add MANAGEMENT_STATIC_PATH env and fix permissions

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -5
Dockerfile CHANGED
@@ -20,16 +20,17 @@ FROM alpine:3.22.0
20
 
21
  RUN apk add --no-cache tzdata curl
22
 
23
- # Download management panel to static directory (must be {config_dir}/static/)
24
- RUN mkdir -p /CLIProxyAPI/static && \
25
- curl -L -o /CLIProxyAPI/static/management.html \
26
- "https://github.com/router-for-me/Cli-Proxy-API-Management-Center/releases/download/v1.2.6/management.html"
27
-
28
  # Create non-root user for HF Spaces
29
  RUN adduser -D -u 1000 user
30
 
31
  RUN mkdir -p /CLIProxyAPI && chown -R user:user /CLIProxyAPI
32
 
 
 
 
 
 
 
33
  COPY --from=builder /app/CLIProxyAPI /CLIProxyAPI/CLIProxyAPI
34
  COPY --from=builder /app/config.example.yaml /CLIProxyAPI/config.example.yaml
35
 
@@ -55,6 +56,7 @@ RUN echo 'host: "0.0.0.0"' > /CLIProxyAPI/config.yaml && \
55
  EXPOSE 7860
56
 
57
  ENV TZ=Asia/Shanghai
 
58
 
59
  RUN cp /usr/share/zoneinfo/${TZ} /etc/localtime && echo "${TZ}" > /etc/timezone
60
 
 
20
 
21
  RUN apk add --no-cache tzdata curl
22
 
 
 
 
 
 
23
  # Create non-root user for HF Spaces
24
  RUN adduser -D -u 1000 user
25
 
26
  RUN mkdir -p /CLIProxyAPI && chown -R user:user /CLIProxyAPI
27
 
28
+ # Download management panel to static directory
29
+ RUN mkdir -p /CLIProxyAPI/static && \
30
+ curl -L -o /CLIProxyAPI/static/management.html \
31
+ "https://github.com/router-for-me/Cli-Proxy-API-Management-Center/releases/download/v1.2.6/management.html" && \
32
+ chown -R user:user /CLIProxyAPI/static
33
+
34
  COPY --from=builder /app/CLIProxyAPI /CLIProxyAPI/CLIProxyAPI
35
  COPY --from=builder /app/config.example.yaml /CLIProxyAPI/config.example.yaml
36
 
 
56
  EXPOSE 7860
57
 
58
  ENV TZ=Asia/Shanghai
59
+ ENV MANAGEMENT_STATIC_PATH=/CLIProxyAPI/static/management.html
60
 
61
  RUN cp /usr/share/zoneinfo/${TZ} /etc/localtime && echo "${TZ}" > /etc/timezone
62