hayou2002 commited on
Commit
48523bb
·
verified ·
1 Parent(s): 68e3e6d

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +16 -7
Dockerfile CHANGED
@@ -1,9 +1,18 @@
1
- FROM openlistteam/openlist:latest
2
  USER root
3
- RUN apk update && apk add --no-cache \
4
- curl \
5
- wget \
6
- net-tools
7
- VOLUME ["/app/data"]
 
 
 
 
 
8
  EXPOSE 5244
9
- ENV OPENLIT_DATA_DIR=/app/data
 
 
 
 
 
1
+ FROM python:3.11-slim
2
  USER root
3
+ WORKDIR /data
4
+ RUN apt-get update && apt-get install -y --no-install-recommends \
5
+ git gcc g++ make curl wget net-tools \
6
+ && rm -rf /var/lib/apt/lists/*
7
+ RUN git clone https://github.com/openlit/openlit.git /app
8
+ WORKDIR /app
9
+ RUN pip install --no-cache-dir -e .[all]
10
+ ENV OPENLIT_DATA_DIR=/data
11
+ ENV OPENLIT_UPLOAD_DIR=/data/uploads
12
+ ENV OPENLIT_STORAGE_DIR=/data/storage
13
  EXPOSE 5244
14
+ VOLUME ["/data"] # 显式声明/data为持久化卷,HF强制保留
15
+ CMD ["openlit", "serve", \
16
+ "--host", "0.0.0.0", \
17
+ "--port", "5244", \
18
+ "--root-path", "/"]