File tree Expand file tree Collapse file tree 17 files changed +53
-245
lines changed
nodejs-react-postgres/client Expand file tree Collapse file tree 17 files changed +53
-245
lines changed Original file line number Diff line number Diff line change 1- # Use the slim version of Debian Bookworm as the base image
2- FROM debian:bookworm-slim
3-
4- # Set environment variables to avoid interactive prompts during package installation
5- ENV DEBIAN_FRONTEND=noninteractive
6-
7- # Update the package list and install Node.js, npm, and any other dependencies
8- RUN apt-get update && apt-get install -y \
9- curl \
10- && curl -sL https://deb.nodesource.com/setup_20.x | bash - \
11- && apt-get install -y nodejs \
12- && apt-get clean \
13- && rm -rf /var/lib/apt/lists/*
1+ # Use the slim version of Node.js on Debian Bookworm as the base image
2+ FROM node:bookworm-slim
143
154# Create and change to the app directory
165WORKDIR /app
Original file line number Diff line number Diff line change 1- # Use the slim version of Debian Bookworm as the base image
2- FROM debian:bookworm-slim
3-
4- # Set environment variables to avoid interactive prompts during package installation
5- ENV DEBIAN_FRONTEND=noninteractive
6-
7- # Update the package list and install Node.js, npm, and any other dependencies
8- RUN apt-get update && apt-get install -y \
9- curl \
10- && curl -sL https://deb.nodesource.com/setup_20.x | bash - \
11- && apt-get install -y nodejs \
12- && apt-get clean \
13- && rm -rf /var/lib/apt/lists/*
1+ # Use the slim version of Node.js on Debian Bookworm as the base image
2+ FROM node:bookworm-slim
143
154# Set the working directory
165WORKDIR /app
176
187# Copy package.json and package-lock.json
198COPY package*.json ./
209
21- # Install dependencies
10+ # Install dependencies using npm ci for a clean install
2211RUN npm ci
2312
2413# Copy the rest of the application source code
Original file line number Diff line number Diff line change 1- # Use the slim version of Debian Bookworm as the base image
2- FROM debian:bookworm-slim
3-
4- # Set environment variables to avoid interactive prompts during package installation
5- ENV DEBIAN_FRONTEND=noninteractive
6-
7- # Update the package list and install Node.js, npm, and any other dependencies
8- RUN apt-get update && apt-get install -y \
9- curl \
10- && curl -sL https://deb.nodesource.com/setup_20.x | bash - \
11- && apt-get install -y nodejs \
12- && apt-get clean \
13- && rm -rf /var/lib/apt/lists/*
1+ # Use the slim version of Node.js on Debian Bookworm as the base image
2+ FROM node:bookworm-slim
143
154# Set the working directory
165WORKDIR /app
176
187# Copy package.json and package-lock.json
198COPY package*.json ./
209
21- # Install dependencies
10+ # Install dependencies using npm ci for a clean install
2211RUN npm ci
2312
2413# Copy the rest of the application source code
Original file line number Diff line number Diff line change 1- # Use the slim version of Debian Bookworm as the base image
2- FROM debian:bookworm-slim
3-
4- # Set environment variables to avoid interactive prompts during package installation
5- ENV DEBIAN_FRONTEND=noninteractive
6-
7- # Update the package list and install Node.js, npm, and any other dependencies
8- RUN apt-get update && apt-get install -y \
9- curl \
10- && curl -sL https://deb.nodesource.com/setup_20.x | bash - \
11- && apt-get install -y nodejs \
12- && apt-get clean \
13- && rm -rf /var/lib/apt/lists/*
1+ # Use the slim version of Node.js on Debian Bookworm as the base image
2+ FROM node:bookworm-slim
143
154# Set the working directory
165WORKDIR /app
176
187# Copy package.json and package-lock.json
198COPY package*.json ./
209
21- # Install dependencies
10+ # Install dependencies using npm ci for a clean install
2211RUN npm ci
2312
2413# Copy the rest of the application source code
Original file line number Diff line number Diff line change 1- # Use the slim version of Debian Bookworm as the base image
2- FROM debian:bookworm-slim
3-
4- # Set environment variables to avoid interactive prompts during package installation
5- ENV DEBIAN_FRONTEND=noninteractive
6-
7- # Update the package list and install Node.js, npm, and any other dependencies
8- RUN apt-get update && apt-get install -y \
9- curl \
10- && curl -sL https://deb.nodesource.com/setup_20.x | bash - \
11- && apt-get install -y nodejs \
12- && apt-get clean \
13- && rm -rf /var/lib/apt/lists/*
1+ # Use the slim version of Node.js on Debian Bookworm as the base image
2+ FROM node:bookworm-slim
143
154# Set the working directory
165WORKDIR /usr/src/app
176
18- # Copy package.json to the working directory
19- COPY package.json ./
7+ # Copy package.json and package-lock.json if available
8+ COPY package* .json ./
209
2110# Install dependencies
2211RUN npm install
Original file line number Diff line number Diff line change 1- # Use the slim version of Debian Bookworm as the base image
2- FROM debian:bookworm-slim
3-
4- # Set environment variables to avoid interactive prompts during package installation
5- ENV DEBIAN_FRONTEND=noninteractive
6-
7- # Update the package list and install Node.js, npm, and any other dependencies
8- RUN apt-get update && apt-get install -y \
9- curl \
10- && curl -sL https://deb.nodesource.com/setup_18.x | bash - \
11- && apt-get install -y nodejs \
12- && apt-get clean \
13- && rm -rf /var/lib/apt/lists/*
1+ # Use the slim version of Node.js on Debian Bookworm as the base image
2+ FROM node:bookworm-slim
143
154# Set the working directory to /app
165WORKDIR /app
Original file line number Diff line number Diff line change 1- # Use the slim version of Debian Bookworm as the base image
2- FROM debian:bookworm-slim
3-
4- # Set environment variables to avoid interactive prompts during package installation
5- ENV DEBIAN_FRONTEND=noninteractive
6-
7- # Update the package list and install Node.js, npm, and any other dependencies
8- RUN apt-get update && apt-get install -y \
9- curl \
10- && curl -sL https://deb.nodesource.com/setup_20.x | bash - \
11- && apt-get install -y nodejs \
12- && apt-get clean \
13- && rm -rf /var/lib/apt/lists/*
1+ # Use the slim version of Node.js on Debian Bookworm as the base image
2+ FROM node:bookworm-slim
143
154# Set the working directory to /app
165WORKDIR /app
@@ -28,4 +17,4 @@ COPY . .
2817EXPOSE 3000
2918
3019# Run the app when the container launches
31- ENTRYPOINT [ "node" , "main.js" ]
20+ ENTRYPOINT ["node" , "main.js" ]
Original file line number Diff line number Diff line change 1- # Use the slim version of Debian Bookworm as the base image
2- FROM debian:bookworm-slim
3-
4- # Set environment variables to avoid interactive prompts during package installation
5- ENV DEBIAN_FRONTEND=noninteractive
6-
7- # Update the package list and install Node.js, npm, and any other dependencies
8- RUN apt-get update && apt-get install -y \
9- curl \
10- && curl -sL https://deb.nodesource.com/setup_20.x | bash - \
11- && apt-get install -y nodejs \
12- && apt-get clean \
13- && rm -rf /var/lib/apt/lists/*
1+ # Use the slim version of Node.js on Debian Bookworm as the base image
2+ FROM node:bookworm-slim
143
154# Set the working directory to /app
165WORKDIR /app
176
187# Copy package.json and package-lock.json into the container at /app
198COPY package*.json ./
209
21- # Install any needed packages specified in package.json
10+ # Install any needed packages specified in package.json using npm ci for a clean install
2211RUN npm ci
2312
2413# Copy the current directory contents into the container at /app
Original file line number Diff line number Diff line change 1- # Use the slim version of Debian Bookworm as the base image
2- FROM debian:bookworm-slim
3-
4- # Set environment variables to avoid interactive prompts during package installation
5- ENV DEBIAN_FRONTEND=noninteractive
6-
7- # Update the package list and install Node.js, npm, and any other dependencies
8- RUN apt-get update && apt-get install -y \
9- curl \
10- && curl -sL https://deb.nodesource.com/setup_18.x | bash - \
11- && apt-get install -y nodejs \
12- && apt-get clean \
13- && rm -rf /var/lib/apt/lists/*
1+ # Use the slim version of Node.js on Debian Bookworm as the base image
2+ FROM node:bookworm-slim
143
154# Set the working directory to /app
165WORKDIR /app
Original file line number Diff line number Diff line change 1- # Use the slim version of Debian Bookworm as the base image
2- FROM debian:bookworm-slim
3-
4- # Set environment variables to avoid interactive prompts during package installation
5- ENV DEBIAN_FRONTEND=noninteractive
6-
7- # Update the package list and install Node.js, npm, and any other dependencies
8- RUN apt-get update && apt-get install -y \
9- curl \
10- && curl -sL https://deb.nodesource.com/setup_20.x | bash - \
11- && apt-get install -y nodejs \
12- && apt-get clean \
13- && rm -rf /var/lib/apt/lists/*
1+ # Use the slim version of Node.js on Debian Bookworm as the base image
2+ FROM node:bookworm-slim
143
154# Set the working directory to /app
165WORKDIR /app
176
187# Copy package.json and package-lock.json into the container at /app
198COPY package*.json ./
209
21- # Install any needed packages specified in package.json
10+ # Install any needed packages specified in package.json using npm ci for a clean install
2211RUN npm ci
2312
2413# Copy the current directory contents into the container at /app
You can’t perform that action at this time.
0 commit comments