Skip to content

Commit

Permalink
fix: update Dockerfile to set permissions for start.sh and .next dire…
Browse files Browse the repository at this point in the history
…ctory
  • Loading branch information
youyou-sudo committed Dec 18, 2024
1 parent fbc64df commit 85faa68
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,10 @@ COPY --from=build /usr/src/app/start.sh ./start.sh

# 设置环境变量和用户
ENV NODE_ENV=production
RUN chmod +x start.sh
RUN chmod +x start.sh && chown -R bun:bun /usr/src/app
USER bun
# 确保 .next 目录存在并设置权限
RUN mkdir -p /usr/src/app/.next/cache && chown -R bun:bun /usr/src/app/.next

EXPOSE 3000
CMD ["./start.sh"]

0 comments on commit 85faa68

Please sign in to comment.