Skip to content

Commit ead71c8

Browse files
committed
fix(docker): 添加 data 目录并修复 hotfix/json/data 权限
日志目录从 /app/logs 迁移至 /app/data/logs, 并为 hotfix、json、data 目录设置正确的用户和组读写权限。
1 parent 0fca42e commit ead71c8

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ COPY --from=publish /app/publish .
2929
COPY --from=publish /app/hotfix/GameFrameX.Hotfix.dll /app/hotfix-default/
3030
COPY --from=publish /app/hotfix/json /app/json-default/
3131

32-
RUN mkdir -p /app/hotfix /app/json /app/logs && \
32+
RUN mkdir -p /app/hotfix /app/json /app/data /app/data/logs && \
3333
printf '#!/bin/sh\n\
3434
if [ -z "$(ls -A /app/hotfix 2>/dev/null)" ]; then\n\
3535
echo "hotfix directory is empty, copying defaults..."\n\
@@ -40,6 +40,8 @@ if [ -z "$(ls -A /app/json 2>/dev/null)" ]; then\n\
4040
cp -r /app/json-default/* /app/json/\n\
4141
fi\n\
4242
exec "$@"' > /app/entrypoint.sh && \
43+
chown -R $APP_UID:0 /app/hotfix /app/json /app/data && \
44+
chmod -R u+rwX,g+rwX /app/hotfix /app/json /app/data && \
4345
chmod +x /app/entrypoint.sh
4446

4547
USER $APP_UID

0 commit comments

Comments
 (0)