Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
next.js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex
next.js
Commits
3f1ae543
Unverified
Commit
3f1ae543
authored
Mar 12, 2024
by
Sam Ko
Committed by
GitHub
Mar 12, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "fix: permissions in with-docker example" (#63165)
Reverts vercel/next.js#63134 Closes NEXT-2783
parent
7b5d81c0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
8 deletions
+6
-8
Dockerfile
examples/with-docker/Dockerfile
+6
-8
No files found.
examples/with-docker/Dockerfile
View file @
3f1ae543
...
@@ -22,8 +22,6 @@ WORKDIR /app
...
@@ -22,8 +22,6 @@ WORKDIR /app
COPY
--from=deps /app/node_modules ./node_modules
COPY
--from=deps /app/node_modules ./node_modules
COPY
. .
COPY
. .
RUN
mkdir
-p
public
# Next.js collects completely anonymous telemetry data about general usage.
# Next.js collects completely anonymous telemetry data about general usage.
# Learn more here: https://nextjs.org/telemetry
# Learn more here: https://nextjs.org/telemetry
# Uncomment the following line in case you want to disable telemetry during the build.
# Uncomment the following line in case you want to disable telemetry during the build.
...
@@ -47,17 +45,17 @@ ENV NODE_ENV production
...
@@ -47,17 +45,17 @@ ENV NODE_ENV production
RUN
addgroup
--system
--gid
1001 nodejs
RUN
addgroup
--system
--gid
1001 nodejs
RUN
adduser
--system
--uid
1001 nextjs
RUN
adduser
--system
--uid
1001 nextjs
COPY
--from=builder /app/public ./public
# Set the correct permission for prerender cache
RUN
mkdir
.next
RUN
chown
nextjs:nodejs .next
# Automatically leverage output traces to reduce image size
# Automatically leverage output traces to reduce image size
# https://nextjs.org/docs/advanced-features/output-file-tracing
# https://nextjs.org/docs/advanced-features/output-file-tracing
COPY
--from=builder --chown=nextjs:nodejs /app/public ./public
COPY
--from=builder --chown=nextjs:nodejs /app/.next/standalone ./
COPY
--from=builder --chown=nextjs:nodejs /app/.next/standalone ./
COPY
--from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static
COPY
--from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static
# Set the correct permission for prerender cache
RUN
mkdir
-p
.next/cache
RUN
chown
-R
nextjs:nodejs .next
RUN
chmod
-R
777 .next/cache
USER
nextjs
USER
nextjs
EXPOSE
3000
EXPOSE
3000
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment