cfjy66 commited on
Commit
275d705
·
verified ·
1 Parent(s): abf23e4

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +23 -0
Dockerfile ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # 使用轻量级基础镜像
2
+ FROM alpine:3.18 as builder
3
+
4
+ # 安装必要依赖(Alpine 镜像专用命令)
5
+ RUN apk add --no-cache \
6
+ git \
7
+ libc6-compat \
8
+ shadow \
9
+ && adduser -D -u 1000 alistuser
10
+
11
+ # 从官方仓库安装 Alist
12
+ RUN wget https://github.com/alist-org/alist/releases/latest/download/alist-linux-amd64.tar.gz \
13
+ && tar -zxvf alist-linux-amd64.tar.gz \
14
+ && mv alist /usr/local/bin/ \
15
+ && chmod +x /usr/local/bin/alist
16
+
17
+ # 配置工作目录
18
+ USER alistuser
19
+ WORKDIR /app
20
+ COPY --chown=alistuser:alistuser sync.sh .
21
+ RUN chmod +x sync.sh
22
+
23
+ CMD ["./sync.sh"]