diff --git a/Dockerfile b/Dockerfile index 03d4572..fc6aced 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,16 +2,17 @@ FROM node:18-alpine AS build # Install dependencies only when needed # Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed. RUN apk add --no-cache libc6-compat + +RUN mkdir /app +COPY package.json /app WORKDIR /app -# Copy and install the dependencies for the project -COPY package.json yarn.lock ./ -RUN yarn -# Copy all other project files to working directory + COPY . . -ENV PORT 3000 +RUN yarn +RUN yarn build + EXPOSE 3000 # Run the next build process and generate the artifacts -RUN yarn build -CMD ["node", ".next/standalone/server.js"] \ No newline at end of file +CMD ["yarn", "start"] \ No newline at end of file