Skip to content

Commit 35d9a95

Browse files
authored
Merge fc1fea3a6c4661254c378c4478dd9986542c2b70 into 7fdd53b5bfec2da2ad912b62d53ac38f9d95a774
2 parents 798c9fb + a67959c commit 35d9a95

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

backend/Dockerfile

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

415
# Create and change to the app directory
516
WORKDIR /app
@@ -15,3 +26,6 @@ COPY . .
1526

1627
# Expose the port the app runs on
1728
EXPOSE 3000
29+
30+
# Define the command to run your application
31+
CMD ["npm", "start"]

0 commit comments

Comments
 (0)