Skip to content

Commit 6cba8ad

Browse files
authored
Merge fc1fea3a6c4661254c378c4478dd9986542c2b70 into 7fdd53b5bfec2da2ad912b62d53ac38f9d95a774
2 parents 991e0fb + 709f73c commit 6cba8ad

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

app/Dockerfile

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
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/*
314

415
# Set the working directory to /app
516
WORKDIR /app
@@ -17,4 +28,4 @@ COPY . .
1728
EXPOSE 3000
1829

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

0 commit comments

Comments
 (0)