-
Notifications
You must be signed in to change notification settings - Fork 27k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: permissions in with-docker example #63134
Conversation
This pr addresses an issue where the cache and the creation of its contents throw the following error: ``` [Error: EACCES: permission denied, mkdir '/app/.next/cache'] { errno: -13, code: 'EACCES', syscall: 'mkdir', path: '/app/.next/cache' ```
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for submitting a
Allow CI Workflow Run
Note: this should only be enabled once the PR is ready to go and can only be enabled by a maintainer |
@@ -22,6 +22,8 @@ WORKDIR /app | |||
COPY --from=deps /app/node_modules ./node_modules | |||
COPY . . | |||
|
|||
RUN mkdir -p public |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dont need to pass -p (only single folder)
and also I think dont need to write this mkdir command (and RUN mkdir -p .next/cache below) because "COPY --from=builder --chown=nextjs:nodejs" automatically create the folder for you
A few things on this
If your not seeing any of these issue, then I would asked what version of next are you using, and are you statically generating any pages? Navigating to a statically generated page throws the errors in the logs. |
What
This pr addresses an issue in Docker where the cache and the creation of its contents throw the following error: