johnpaulbin commited on
Commit
ee841d4
·
1 Parent(s): 9959a74

Add application file

Browse files
Files changed (1) hide show
  1. Dockerfile +31 -0
Dockerfile ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM node:18
2
+
3
+ ARG DEBIAN_FRONTEND=noninteractive
4
+
5
+ ENV BING_HEADER ""
6
+
7
+ # Set home to the user's home directory
8
+ ENV HOME=/home/user \
9
+ PATH=/home/user/.local/bin:$PATH
10
+
11
+ # Set up a new user named "user" with user ID 1000
12
+ RUN useradd -o -u 1000 user && mkdir -p $HOME/app && chown -R user $HOME
13
+
14
+ # Switch to the "user" user
15
+ USER user
16
+
17
+ # Set the working directory to the user's home directory
18
+ WORKDIR $HOME/app
19
+
20
+ # Copy the current directory contents into the container at $HOME/app setting the owner to the user
21
+ COPY --chown=user . $HOME/app/
22
+
23
+ #RUN npm install && npm run build
24
+
25
+ RUN rm -rf src
26
+
27
+ ENV PORT 7860
28
+
29
+ EXPOSE 7860
30
+
31
+ CMD npm start