tomayac commited on
Commit
c4339fd
·
verified ·
1 Parent(s): 8df8ffb

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +26 -0
Dockerfile ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Node base image
2
+ FROM node:24-alpine
3
+
4
+ # Switch to the "node" user
5
+ USER node
6
+
7
+ # Set home to the user's home directory
8
+ ENV HOME=/home/node PATH=/home/node/.local/bin:$PATH
9
+
10
+ # Set the working directory to the user's home directory
11
+ WORKDIR $HOME/app
12
+
13
+ # Moving file to user's home directory
14
+ ADD . $HOME/app
15
+
16
+ # Copy the current directory contents into the container at $HOME/app setting the owner to the user
17
+ COPY --chown=node . $HOME/app
18
+
19
+ # Loading Dependencies
20
+ RUN npm install
21
+
22
+ # Expose application's default port
23
+ EXPOSE 7860
24
+
25
+ # Entry Point
26
+ ENTRYPOINT ["nodejs", "./index.js"]