Skip to content

Commit 82385e3

Browse files
committed
changed to using node bookworm slim instead of debian bookworm slim
1 parent a0c0dcf commit 82385e3

File tree

17 files changed

+53
-245
lines changed

17 files changed

+53
-245
lines changed

samples/angular-express/backend/Dockerfile

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,5 @@
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
165
WORKDIR /app

samples/bullmq-bullboard-redis/api/Dockerfile

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,13 @@
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
165
WORKDIR /app
176

187
# Copy package.json and package-lock.json
198
COPY package*.json ./
209

21-
# Install dependencies
10+
# Install dependencies using npm ci for a clean install
2211
RUN npm ci
2312

2413
# Copy the rest of the application source code

samples/bullmq-bullboard-redis/board/Dockerfile

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,13 @@
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
165
WORKDIR /app
176

187
# Copy package.json and package-lock.json
198
COPY package*.json ./
209

21-
# Install dependencies
10+
# Install dependencies using npm ci for a clean install
2211
RUN npm ci
2312

2413
# Copy the rest of the application source code

samples/bullmq-bullboard-redis/worker/Dockerfile

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,13 @@
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
165
WORKDIR /app
176

187
# Copy package.json and package-lock.json
198
COPY package*.json ./
209

21-
# Install dependencies
10+
# Install dependencies using npm ci for a clean install
2211
RUN npm ci
2312

2413
# Copy the rest of the application source code

samples/feathersjs/src/Dockerfile

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,11 @@
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
165
WORKDIR /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
2211
RUN npm install

samples/nodejs-chatroom/app/Dockerfile

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,5 @@
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
165
WORKDIR /app
Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,5 @@
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
165
WORKDIR /app
@@ -28,4 +17,4 @@ COPY . .
2817
EXPOSE 3000
2918

3019
# Run the app when the container launches
31-
ENTRYPOINT [ "node", "main.js" ]
20+
ENTRYPOINT ["node", "main.js"]

samples/nodejs-form/app/Dockerfile

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,13 @@
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
165
WORKDIR /app
176

187
# Copy package.json and package-lock.json into the container at /app
198
COPY 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
2211
RUN npm ci
2312

2413
# Copy the current directory contents into the container at /app

samples/nodejs-http/app/Dockerfile

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,5 @@
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
165
WORKDIR /app

samples/nodejs-openai/app/Dockerfile

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,13 @@
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
165
WORKDIR /app
176

187
# Copy package.json and package-lock.json into the container at /app
198
COPY 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
2211
RUN npm ci
2312

2413
# Copy the current directory contents into the container at /app

0 commit comments

Comments
 (0)