From db60f11f6e9adcb2fe08e2f70ccd37d2987cebad Mon Sep 17 00:00:00 2001 From: Ryan Mwangi Date: Thu, 21 Nov 2024 14:55:22 +0300 Subject: [PATCH] build(docker): create and populate dockerfile --- dockerfile | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 dockerfile diff --git a/dockerfile b/dockerfile new file mode 100644 index 0000000..580486e --- /dev/null +++ b/dockerfile @@ -0,0 +1,20 @@ +# Use an official Node.js runtime as a parent image +FROM node:18-alpine + +# Set working directory inside the container +WORKDIR /usr/src/app + +# Copy package.json and package-lock.json for installing dependencies +COPY package*.json ./ + +# Install dependencies +RUN npm install --production + +# Copy the rest of the project files +COPY . . + +# Expose the port your application runs on (if applicable) +EXPOSE 3002 + +# Command to run the application +CMD ["node", "src/server.js"]