Charan5775 commited on
Commit
63afdb6
·
verified ·
1 Parent(s): 2b4c9e3

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +17 -7
Dockerfile CHANGED
@@ -1,11 +1,21 @@
1
- # Start from the existing image
2
- FROM iib0011/omni-tools:latest
3
 
4
- # Expose the internal port used by the container
 
 
 
 
 
 
 
 
 
 
5
  EXPOSE 8080
6
 
7
- # Optionally set a restart policy hint (Dockerfile doesn't support --restart)
8
- # The restart policy must be applied when running the container, not during build.
9
 
10
- # Define default command (if not already defined in base image)
11
- #CMD ["nginx", "-g", "daemon off;"]
 
1
+ # Use official Node.js image (LTS version)
2
+ FROM node:18-alpine
3
 
4
+ # Set working directory inside container
5
+ WORKDIR /app
6
+
7
+ # Clone the repository directly inside the container
8
+ RUN apk add --no-cache git && \
9
+ git clone https://github.com/iib0011/omni-tools.git .
10
+
11
+ # Install dependencies
12
+ RUN npm install
13
+
14
+ # Expose the app port
15
  EXPOSE 8080
16
 
17
+ # Set environment variable for port (optional, if app reads process.env.PORT)
18
+ ENV PORT=8080
19
 
20
+ # Run the app
21
+ CMD ["npm", "run", "dev"]