Update Dockerfile
Browse files- Dockerfile +0 -46
Dockerfile
CHANGED
@@ -1,46 +0,0 @@
|
|
1 |
-
# 使用官方的 Node.js 镜像,基于 Debian Slim 版本,更加精简
|
2 |
-
FROM node:slim
|
3 |
-
|
4 |
-
# 切换到 root 用户以安装必要的软件包
|
5 |
-
USER root
|
6 |
-
|
7 |
-
# 设置工作目录
|
8 |
-
WORKDIR /home/node/app
|
9 |
-
|
10 |
-
# 安装 Python3, pip, rclone 及其他常用工具
|
11 |
-
RUN apt-get update && \
|
12 |
-
apt-get install -y --no-install-recommends \
|
13 |
-
python3 python3-pip rclone fuse \
|
14 |
-
wget curl unzip vim git procps lsof net-tools \
|
15 |
-
ca-certificates openssl gnupg && \
|
16 |
-
apt-get install -y tzdata && \
|
17 |
-
ln -fs /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \
|
18 |
-
dpkg-reconfigure --frontend noninteractive tzdata && \
|
19 |
-
apt-get clean && \
|
20 |
-
rm -rf /var/lib/apt/lists/*
|
21 |
-
|
22 |
-
# 设置目录权限
|
23 |
-
RUN chown -R node:node /home/node
|
24 |
-
|
25 |
-
# 全局安装 n8n
|
26 |
-
RUN npm install n8n -g
|
27 |
-
|
28 |
-
# 复制启动脚本并赋予执行权限
|
29 |
-
COPY entrypoint.sh /entrypoint.sh
|
30 |
-
RUN chmod +x /entrypoint.sh
|
31 |
-
|
32 |
-
# 切换回 node 用户
|
33 |
-
USER node
|
34 |
-
|
35 |
-
# 设置环境变量,包括时区设置
|
36 |
-
ENV N8N_HOST=0.0.0.0
|
37 |
-
ENV N8N_PORT=5678
|
38 |
-
ENV N8N_PROTOCOL=https
|
39 |
-
ENV WEBHOOK_URL=https://hijnu-n8n.hf.space/
|
40 |
-
ENV GENERIC_TIMEZONE=Asia/Shanghai
|
41 |
-
|
42 |
-
# 暴露 n8n 端口
|
43 |
-
EXPOSE 5678
|
44 |
-
|
45 |
-
# 设置启动脚本为入口点
|
46 |
-
ENTRYPOINT ["/entrypoint.sh"]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|