Update Dockerfile
Browse files- Dockerfile +9 -18
Dockerfile
CHANGED
@@ -1,28 +1,19 @@
|
|
1 |
-
# 直接继承官方镜像
|
2 |
FROM nocodb/nocodb:latest
|
3 |
|
4 |
-
|
5 |
-
ARG CACHEBUST=5
|
6 |
-
|
7 |
-
# 构建时可注入的参数(与示例文件格式一致)
|
8 |
ARG PORT=7860
|
9 |
-
ARG NC_DB=$DB_pgurl
|
10 |
-
ARG NC_AUTH_JWT_SECRET="569a1821-1234-5678-87ab-eb857f20a010"
|
11 |
|
12 |
-
# 切换到 root 用户以修改权限
|
13 |
USER root
|
14 |
|
15 |
-
#
|
16 |
-
RUN mkdir -p /usr/app && \
|
17 |
-
chown -R node:node /usr/app && \
|
18 |
-
chmod
|
19 |
-
|
20 |
-
chmod +x docker/main.js
|
21 |
-
# chmod -R 777 /usr/app
|
22 |
|
23 |
-
# 切换回 node 用户
|
24 |
USER node
|
25 |
|
26 |
-
|
27 |
-
|
|
|
28 |
CMD ["/usr/src/appEntry/start.sh"]
|
|
|
|
|
1 |
FROM nocodb/nocodb:latest
|
2 |
|
3 |
+
ARG CACHEBUST=6
|
|
|
|
|
|
|
4 |
ARG PORT=7860
|
|
|
|
|
5 |
|
|
|
6 |
USER root
|
7 |
|
8 |
+
# 确保所有必要目录权限
|
9 |
+
RUN mkdir -p /usr/app /usr/src/app && \
|
10 |
+
chown -R node:node /usr/app /usr/src/app && \
|
11 |
+
chmod -R 755 /usr/app /usr/src/app && \
|
12 |
+
chmod +x /usr/src/appEntry/start.sh
|
|
|
|
|
13 |
|
|
|
14 |
USER node
|
15 |
|
16 |
+
EXPOSE ${PORT}
|
17 |
+
|
18 |
+
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
|
19 |
CMD ["/usr/src/appEntry/start.sh"]
|