FEAT: Added dockerfile
This commit is contained in:
20
dockerfile
Normal file
20
dockerfile
Normal file
@ -0,0 +1,20 @@
|
||||
FROM node:lts-slim as build
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY package*.json ./
|
||||
RUN rm -rf node_modules
|
||||
RUN rm -rf build
|
||||
COPY . .
|
||||
RUN npm install
|
||||
RUN npm run build
|
||||
|
||||
FROM node:lts-slim as run
|
||||
|
||||
WORKDIR /app
|
||||
COPY --from=build /app/package.json ./package.json
|
||||
COPY --from=build /app/build ./build
|
||||
RUN npm install --omit=dev
|
||||
|
||||
EXPOSE 3000
|
||||
ENTRYPOINT [ "npm", "run", "start" ]
|
Reference in New Issue
Block a user