OpenList / Dockerfile
lzwqx's picture
Update Dockerfile
4202d8c verified
raw
history blame contribute delete
974 Bytes
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"]