File size: 1,105 Bytes
8397318 e2e89ab 8397318 7eb30e2 8397318 c0d0f18 b1c9d0a c0d0f18 23234d8 c0d0f18 0b224b3 4cf155f c37c146 40b2574 23234d8 c830c4f 8397318 3712219 c0d0f18 23234d8 c0d0f18 ce2e827 23234d8 |
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/v4.0.8/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
COPY --chown=user sync_data.sh $HOME/app/
RUN chmod +x $HOME/app/sync_data.sh
RUN chown -R user:user /home/user
USER user
CMD ["/bin/bash", "-c", "$HOME/app/sync_data.sh & sleep 15 && ./openlist server"] |