fix: 🐛 dockerfile文件权限修改

This commit is contained in:
GoCo 2025-07-22 17:56:19 +08:00
parent 1c3197b9d8
commit 63a869a390

View File

@ -7,4 +7,9 @@ RUN npm install && npm run build
# 使用 nginx 作为生产环境
FROM nginx:stable-alpine
COPY --from=builder /app/dist /usr/share/nginx/html
# 设置静态资源的访问权限,避免 403 Forbidden
RUN find /usr/share/nginx/html -type f -exec chmod 644 {} \; \
&& find /usr/share/nginx/html -type d -exec chmod 755 {} \;
COPY nginx.conf /etc/nginx/conf.d/default.conf