File size: 1,082 Bytes
f1ee8ac
03bef3d
f1ee8ac
03bef3d
f1ee8ac
 
 
 
 
 
 
8e215b4
f1ee8ac
73be916
80b44a6
e842363
73be916
f1ee8ac
 
 
0dc9e40
f1ee8ac
48e0c5e
af783c2
9eb75bf
0dc9e40
 
 
 
 
 
60ae6da
0dc9e40
 
 
15b0cf4
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
FROM openlistteam/openlist:latest AS builder

FROM ubuntu:latest

WORKDIR /app

COPY --from=builder /opt/openlist/ .

# RUN  chmod 777 /app/openlist/openlist
# RUN sudo mv /app/openlist/openlist /usr/local/bin/openlist

COPY /data/* /app/data

RUN apt update && apt install curl -y && apt install sudo git ffmpeg -y

ENV OPENLIST_ADMIN_PASSWORD 123321
ENV TZ Asia/Shanghai

RUN chmod 777 /app/openlist

RUN curl -sSf https://sshx.io/get | sh

EXPOSE 7860


CMD ["/bin/bash", "-c", "\
    # 后台启动openlist(加&),避免卡住后续命令
    /app/openlist start & \
    # 确保openlist启动完成
    sleep 2 && \
    # 启动sshx(后台运行,避免占用终端)
    sshx  &&\
    # 进入交互式bash终端(保持容器运行)
    /bin/bash \
"]
# cd openlist2/openlist && \
#  git pull && \
# #  git config --global advice.addIgnoredFile false && \
#  git config --global user.email "you@example.com" && \
#  git config --global user.name "Your Name" && \
#  git add data/config.json && git add data/data.db && git commit -m 'update data [skip ci]' && git