From 1b1e03da073e9f16e33463bc9568592774645e05 Mon Sep 17 00:00:00 2001 From: Bhavya-55 Date: Sun, 12 May 2024 18:04:03 +0530 Subject: [PATCH] created a dockerfile --- Dockerfile | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..575c1bc --- /dev/null +++ b/Dockerfile @@ -0,0 +1,22 @@ +# Use a specific version of Node.js Alpine image +FROM node:20-alpine + +# Set the working directory in the container +WORKDIR /app + +# Copy package.json, package-lock.json and tsconfig to the working directory + +COPY tsconfig.json ./ +COPY package*.json ./ + +# Install dependencies +RUN npm ci +# Copy the entire project directory into the working directory +COPY . . +# Build the Next.js application +RUN npm run build +# Expose port 3000 to the outside world +EXPOSE 3000 +# Command to run the Next.js application +CMD ["npm","run","dev"] +