mirror of
https://github.com/johndoe6345789/docker-swarm-termina.git
synced 2026-04-24 13:45:01 +00:00
Fix Dockerfile to copy all files and build Next.js app
- Change COPY * to COPY . to include subdirectories (public/, app/, etc.) - Add npm run build step for Next.js production build - Change CMD from node server.js to npm start for Next.js
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
FROM node
|
||||
WORKDIR /app
|
||||
COPY * /app/
|
||||
COPY . /app/
|
||||
RUN npm i
|
||||
RUN npm run build
|
||||
RUN chmod +x /app/entrypoint.sh
|
||||
ENTRYPOINT ["/app/entrypoint.sh"]
|
||||
CMD ["node", "server.js"]
|
||||
CMD ["npm", "start"]
|
||||
|
||||
Reference in New Issue
Block a user