Reputation: 360
My container is exiting immediately upon running.
I am using Nestjs and Postgres.
Here is my Dockerfile:
FROM node:14.5.0 AS build
WORKDIR /src
RUN apt update && apt install python -y
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build
FROM node:14.5.0-alpine
ENV PORT=3000
WORKDIR /src
COPY --from=build /src/node_modules ./node_modules
COPY --from=build /src/dist ./dist
EXPOSE 3000
CMD [ "node", "dist/src/main.js"]
Here is the console output:
Thanks in Advance
Upvotes: 2
Views: 1656
Reputation: 360
So i solved it using Node version 13
I do not know whether the issue is in node 14 or if the Nest is not compatible with Node 14 yet.
For someone reading in future, here is the issue you can track :
https://github.com/nestjs/nest/issues/5045
Upvotes: 1