From 16e81ef615c647338d34477e1a103a25a8b2bb3d Mon Sep 17 00:00:00 2001 From: vyas-shyam Date: Tue, 19 Nov 2024 18:39:01 +0530 Subject: [PATCH 1/2] update Dockerfile base image from node:16 to node:18.16.1 and add .dockerignore file --- .dockerignore | 14 ++++++++++++++ Dockerfile | 5 ++--- 2 files changed, 16 insertions(+), 3 deletions(-) create mode 100644 .dockerignore diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..e44b1af --- /dev/null +++ b/.dockerignore @@ -0,0 +1,14 @@ +.dockerignore +.env +.git +.github +.gitignore +.pm2 +Dockerfile +docker-compose.yml +npm-debug.log +README.md +build +dist +.next +node_modules diff --git a/Dockerfile b/Dockerfile index f08e96a..3905e40 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Node.js LTS 10.x.x from Docker Hub -FROM node:16 +FROM node:18.16.1 # Create app directory WORKDIR /usr/src/app @@ -8,7 +8,7 @@ WORKDIR /usr/src/app # A wildcard is used to ensure both package.json AND package-lock.json are copied # where available (npm@5+) COPY package*.json ./ -# RUN npm install +RUN npm install # Bundle app source COPY . . @@ -17,6 +17,5 @@ COPY . . # Note: ports can be exposed at runtime too with --expose or -p : EXPOSE 3000 -RUN npm run compile # Define run command CMD [ "node", "build/src/server.js" ] From 5769cc192ce0ad5254ed72009d950f26bc2b1e94 Mon Sep 17 00:00:00 2001 From: ayshvm <8561614+ayshvm@users.noreply.github.com> Date: Tue, 26 Nov 2024 11:45:41 +0530 Subject: [PATCH 2/2] Update Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 3905e40..beabfef 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Node.js LTS 10.x.x from Docker Hub -FROM node:18.16.1 +FROM node:18.19.1 # Create app directory WORKDIR /usr/src/app