File size: 343 Bytes
9d45a54
311cc15
1584a07
 
 
 
 
 
 
 
 
 
 
 
9d45a54
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
FROM ubuntu:latest

# Set environment variables for Node.js installation
ENV NODE_VERSION=21

# Update package lists
RUN apt-get update && apt-get install -y curl

# Add Node.js repository
RUN curl -fsSL https://deb.nodesource.com/setup_${NODE_VERSION}.x | bash -

# Install Node.js
RUN apt-get install -y nodejs

CMD npm install
CMD npm start