Spaces:
Running
Running
Juice Smith
commited on
Update Dockerfile
Browse files- Dockerfile +24 -14
Dockerfile
CHANGED
@@ -1,17 +1,27 @@
|
|
1 |
FROM ykxvk8yl5l/alist as builder
|
2 |
|
3 |
|
4 |
-
FROM
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
FROM ykxvk8yl5l/alist as builder
|
2 |
|
3 |
|
4 |
+
FROM ubuntu:22.04
|
5 |
+
|
6 |
+
# Set up a new user named "user" with user ID 1000
|
7 |
+
RUN useradd -m -u 1000 user
|
8 |
+
|
9 |
+
# Switch to the "user" user
|
10 |
+
USER user
|
11 |
+
|
12 |
+
# Set home to the user's home directory
|
13 |
+
ENV HOME=/home/user \
|
14 |
+
PATH=/home/user/.local/bin:$PATH
|
15 |
+
|
16 |
+
# Set the working directory to the user's home directory
|
17 |
+
WORKDIR $HOME/alist
|
18 |
+
|
19 |
+
COPY --chown=user --from=builder /opt/alist/alist $HOME/alist
|
20 |
+
|
21 |
+
RUN chmod +x $HOME/alist/alist
|
22 |
+
# CMD ["bash", "alist", "server"]
|
23 |
+
CMD cd $HOME/alist && ./alist server
|
24 |
+
EXPOSE 5244
|
25 |
+
|
26 |
+
|
27 |
+
|