File tree Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Original file line number Diff line number Diff line change 1
- # Use an official Node runtime based on Alpine as a parent image
2
- FROM node:20-alpine
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/*
3
14
4
15
# Set the working directory to /app
5
16
WORKDIR /app
@@ -17,4 +28,4 @@ COPY . .
17
28
EXPOSE 3000
18
29
19
30
# Run the app when the container launches
20
- ENTRYPOINT [ "node" , "main.js" ]
31
+ ENTRYPOINT ["node" , "main.js" ]
You can’t perform that action at this time.
0 commit comments