File tree Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change 1
- # Use the official Node.js 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
# Create and change to the app directory
5
16
WORKDIR /app
@@ -15,3 +26,6 @@ COPY . .
15
26
16
27
# Expose the port the app runs on
17
28
EXPOSE 3000
29
+
30
+ # Define the command to run your application
31
+ CMD ["npm" , "start" ]
You can’t perform that action at this time.
0 commit comments