Spaces:
Running
Running
Update Dockerfile
Browse files- Dockerfile +9 -12
Dockerfile
CHANGED
@@ -1,20 +1,17 @@
|
|
1 |
-
#
|
2 |
-
FROM node:
|
3 |
|
4 |
# 设置工作目录
|
5 |
WORKDIR /app
|
6 |
|
7 |
-
#
|
8 |
-
|
9 |
|
10 |
-
#
|
11 |
-
RUN npm install
|
12 |
-
|
13 |
-
# 复制项目文件到工作目录
|
14 |
COPY . .
|
15 |
|
16 |
-
#
|
17 |
-
EXPOSE
|
18 |
|
19 |
-
#
|
20 |
-
CMD ["
|
|
|
1 |
+
# 使用官方 Node.js 镜像
|
2 |
+
FROM node:18-alpine
|
3 |
|
4 |
# 设置工作目录
|
5 |
WORKDIR /app
|
6 |
|
7 |
+
# 安装 @filen/webdav 包
|
8 |
+
RUN npm install @filen/webdav@latest
|
9 |
|
10 |
+
# 复制当前目录下的代码到容器中
|
|
|
|
|
|
|
11 |
COPY . .
|
12 |
|
13 |
+
# 暴露端口
|
14 |
+
EXPOSE 8080
|
15 |
|
16 |
+
# 运行代码
|
17 |
+
CMD ["node", "index.js"]
|