周泳恩 commited on
Commit
e439aab
·
1 Parent(s): cb08e60

修复Docker容器中的权限问题

Browse files
Files changed (2) hide show
  1. Dockerfile +7 -1
  2. docker/docker-entrypoint.sh +2 -2
Dockerfile CHANGED
@@ -25,7 +25,9 @@ COPY . ./
25
  RUN \
26
  rm -f "config.yaml" || true && \
27
  ln -s "./config/config.yaml" "config.yaml" || true && \
28
- mkdir "config" || true
 
 
29
 
30
  # Pre-compile public libraries
31
  RUN \
@@ -45,6 +47,10 @@ RUN \
45
  # Fix extension repos permissions
46
  RUN git config --global --add safe.directory "*"
47
 
 
 
 
 
48
  EXPOSE 8000
49
 
50
  # Ensure proper handling of kernel signals
 
25
  RUN \
26
  rm -f "config.yaml" || true && \
27
  ln -s "./config/config.yaml" "config.yaml" || true && \
28
+ mkdir -p "config" || true && \
29
+ chmod 777 "config" && \
30
+ chmod 777 ./
31
 
32
  # Pre-compile public libraries
33
  RUN \
 
47
  # Fix extension repos permissions
48
  RUN git config --global --add safe.directory "*"
49
 
50
+ # Ensure proper file permissions
51
+ RUN chown -R node:node ${APP_HOME} && \
52
+ chmod -R 755 ${APP_HOME}
53
+
54
  EXPOSE 8000
55
 
56
  # Ensure proper handling of kernel signals
docker/docker-entrypoint.sh CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:de997a6fe40046b998d6ee518e9a3b92067ed7ea77c4ef762c5e75e596aef5bc
3
- size 465
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a440696c1a00a8ec8d9312b1c4c4a471e582703245c2ad8ffa72aef044e41a94
3
+ size 919