ERROR418 commited on
Commit
841023d
·
verified ·
1 Parent(s): d9a9d6d

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +13 -16
Dockerfile CHANGED
@@ -1,31 +1,28 @@
1
- FROM ubuntu:22.04
2
 
3
- RUN apt-get update && apt-get install -y \
4
- python3 python3-pip python3-venv \
5
- wget curl tar gzip bash jq \
6
- && rm -rf /var/lib/apt/lists/*
7
 
8
- RUN adduser --disabled-password --gecos '' --uid 1000 user
9
  RUN mkdir -p /home/user/data && chown -R user:user /home/user/data
10
 
11
  ENV HOME=/home/user \
12
- PATH=/home/user/.local/bin:$PATH
 
13
  WORKDIR $HOME/app
14
 
15
  ENV VIRTUAL_ENV=$HOME/venv
16
  RUN python3 -m venv $VIRTUAL_ENV
17
  ENV PATH="$VIRTUAL_ENV/bin:$PATH"
18
- RUN pip install --no-cache-dir requests webdavclient3 huggingface_hub
19
-
20
- RUN wget -q https://github.com/OpenListTeam/OpenList/releases/download/beta/openlist-linux-amd64.tar.gz && \
21
- tar -xzf openlist-linux-amd64.tar.gz && \
22
- find . -type f -name "openlist" -exec chmod +x {} \; && \
23
- find . -type f -name "openlist" -exec mv {} . \; && \
24
- rm -rf openlist-linux-amd64.tar.gz *linux-amd64*
25
 
26
  COPY --chown=user . $HOME/app
 
27
 
28
- RUN chown -R user:user /home/user
 
29
 
 
30
  USER user
31
- CMD ["./openlist", "server"]
 
 
1
+ FROM alpine:latest
2
 
3
+ RUN apk add --no-cache python3 py3-pip curl tar gzip bash jq
4
+
5
+ RUN adduser -D -u 1000 user
 
6
 
 
7
  RUN mkdir -p /home/user/data && chown -R user:user /home/user/data
8
 
9
  ENV HOME=/home/user \
10
+ PATH=/home/user/.local/bin:$PATH
11
+
12
  WORKDIR $HOME/app
13
 
14
  ENV VIRTUAL_ENV=$HOME/venv
15
  RUN python3 -m venv $VIRTUAL_ENV
16
  ENV PATH="$VIRTUAL_ENV/bin:$PATH"
17
+ RUN pip install --no-cache-dir requests webdavclient3
 
 
 
 
 
 
18
 
19
  COPY --chown=user . $HOME/app
20
+ COPY --chown=user sync_data.sh $HOME/app/
21
 
22
+ RUN chmod +x $HOME/app/app && \
23
+ chmod +x $HOME/app/sync_data.sh
24
 
25
+ RUN chown -R user:user /home/user
26
  USER user
27
+
28
+ CMD ["/bin/bash", "-c", "$HOME/app/sync_data.sh & sleep 10 && ./app server"]