File size: 974 Bytes
cd3da94
 
 
 
 
86bbfaa
cd3da94
86bbfaa
 
760dd6c
86bbfaa
 
cd3da94
 
86bbfaa
 
 
 
cd3da94
 
 
86bbfaa
 
 
cd3da94
 
4202d8c
86bbfaa
cd3da94
86bbfaa
4202d8c
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
FROM ubuntu:22.04

RUN apt-get update && apt-get install -y \
    python3 python3-pip python3-venv \
    wget curl tar gzip bash jq \
    && rm -rf /var/lib/apt/lists/*

RUN adduser --disabled-password --gecos '' --uid 1000 user
RUN mkdir -p /home/user/data && chown -R user:user /home/user/data

ENV HOME=/home/user \
    PATH=/home/user/.local/bin:$PATH
WORKDIR $HOME/app

ENV VIRTUAL_ENV=$HOME/venv
RUN python3 -m venv $VIRTUAL_ENV
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
RUN pip install --no-cache-dir requests webdavclient3 huggingface_hub

RUN wget -q https://github.com/OpenListTeam/OpenList/releases/download/beta/openlist-linux-amd64.tar.gz && \
    tar -xzf openlist-linux-amd64.tar.gz && \
    find . -type f -name "openlist" -exec chmod +x {} \; && \
    find . -type f -name "openlist" -exec mv {} . \; && \
    rm -rf openlist-linux-amd64.tar.gz *linux-amd64*

COPY --chown=user . $HOME/app

RUN chown -R user:user /home/user

USER user
CMD ["./openlist", "server"]