Spaces:
Running
Running
Create Dockerfile
Browse files- Dockerfile +50 -0
Dockerfile
ADDED
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Node base image
|
2 |
+
FROM node:18
|
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 \
|
9 |
+
PATH=/home/node/.local/bin:$PATH
|
10 |
+
|
11 |
+
# Set the working directory to the user's home directory
|
12 |
+
WORKDIR $HOME/app
|
13 |
+
|
14 |
+
# Moving file to user's home directory
|
15 |
+
ADD . $HOME/app
|
16 |
+
|
17 |
+
# Copy the current directory contents into the container at $HOME/app setting the owner to the user
|
18 |
+
COPY --chown=node . $HOME/app
|
19 |
+
|
20 |
+
# Clone HeyGen Github repository
|
21 |
+
RUN git clone https://github.com/mbarnig/InteractiveAvatarNextJSDemo.git
|
22 |
+
|
23 |
+
# Show content
|
24 |
+
RUN pwd && ls
|
25 |
+
|
26 |
+
# change folder
|
27 |
+
WORKDIR $HOME/app/InteractiveAvatarNextJSDemo
|
28 |
+
RUN ls -a
|
29 |
+
# RUN npm run dev
|
30 |
+
# RUN node app.js
|
31 |
+
|
32 |
+
# Loading Dependencies
|
33 |
+
RUN npm install
|
34 |
+
|
35 |
+
# RUN npm audit fix
|
36 |
+
|
37 |
+
RUN npm run dev
|
38 |
+
|
39 |
+
# Expose application's default port
|
40 |
+
EXPOSE 3000
|
41 |
+
|
42 |
+
# Entry Point
|
43 |
+
# WORKDIR $HOME/app
|
44 |
+
# RUN node app.js
|
45 |
+
# ENTRYPOINT ["nodejs", "./index.mjs"]
|
46 |
+
|
47 |
+
# Command to start the application
|
48 |
+
CMD ["npm", "run", "dev"]
|
49 |
+
# CMD ["npm", "run", "build"]
|
50 |
+
# CMD ["npm", "server.js
|