generated from Fascinated/nextjs-13-template-with-tailwindcss
15 lines
320 B
Docker
15 lines
320 B
Docker
FROM node:lts-alpine
|
|
ENV NODE_ENV=production
|
|
WORKDIR /usr/src/app
|
|
COPY ["package.json", "package-lock.json*", "npm-shrinkwrap.json*", "./"]
|
|
RUN npm install --production --silent && mv node_modules ../
|
|
COPY . .
|
|
EXPOSE 3000
|
|
RUN chown -R node /usr/src/app
|
|
USER node
|
|
|
|
# Build the app
|
|
RUN npm run build
|
|
|
|
CMD ["npm", "start"]
|