2023-07-01 20:43:53 +00:00
|
|
|
FROM node:lts-alpine
|
|
|
|
ENV NODE_ENV=production
|
|
|
|
WORKDIR /usr/src/app
|
2023-07-02 14:09:25 +00:00
|
|
|
COPY ["package.json", "package-lock.json*", "npm-shrinkwrap.json*", "./"]
|
2023-07-01 20:43:53 +00:00
|
|
|
RUN npm install --production --silent && mv node_modules ../
|
|
|
|
COPY . .
|
|
|
|
EXPOSE 3000
|
2023-07-01 21:17:34 +00:00
|
|
|
|
2023-07-02 11:05:27 +00:00
|
|
|
# Opt out of NextJS telemetry
|
|
|
|
RUN npx next telemetry disable
|
|
|
|
|
2023-07-01 21:17:34 +00:00
|
|
|
# Build the app
|
2023-07-02 14:09:25 +00:00
|
|
|
#RUN npm run build
|
2023-07-01 21:17:34 +00:00
|
|
|
|
2023-07-02 14:04:33 +00:00
|
|
|
# Setup permissions
|
|
|
|
RUN chown -R node /usr/src/app
|
|
|
|
USER node
|
|
|
|
|
2023-07-01 20:43:53 +00:00
|
|
|
CMD ["npm", "start"]
|