Spaces:
Sleeping
Sleeping
abubasith86
commited on
Commit
·
7769088
1
Parent(s):
877a9d0
Working code
Browse files- Dockerfile +9 -42
Dockerfile
CHANGED
@@ -1,56 +1,23 @@
|
|
1 |
-
# FROM node:23.7.0 as builder
|
2 |
-
|
3 |
-
# # Install git
|
4 |
-
# RUN apt-get update && apt-get install -y git
|
5 |
-
|
6 |
-
# # Clone the GitHub repository
|
7 |
-
# RUN rm -rf /usr/src/app && git clone https://github.com/abubasith456/Node-WLA.git /usr/src/app
|
8 |
-
|
9 |
-
# # Set the working directory
|
10 |
-
# WORKDIR /usr/src/app
|
11 |
-
|
12 |
-
# RUN if [ -f "Dockerfile" ]; then echo "Found Dockerfile in repo"; else echo "No Dockerfile found" && exit 1; fi
|
13 |
-
|
14 |
-
# # Install npm dependencies
|
15 |
-
# RUN npm install
|
16 |
-
|
17 |
-
# RUN npm ci
|
18 |
-
|
19 |
-
# # Expose the port your application runs on
|
20 |
-
# EXPOSE 5000
|
21 |
-
|
22 |
-
# # Start the application
|
23 |
-
# CMD ["npm", "start"]
|
24 |
-
|
25 |
-
|
26 |
-
# Base image
|
27 |
FROM node:23.7.0 as builder
|
28 |
|
29 |
-
# Install
|
30 |
RUN apt-get update && apt-get install -y git
|
31 |
|
32 |
-
# Clone the repository
|
33 |
RUN rm -rf /usr/src/app && git clone https://github.com/abubasith456/Node-WLA.git /usr/src/app
|
34 |
|
35 |
# Set the working directory
|
36 |
WORKDIR /usr/src/app
|
37 |
|
38 |
-
|
39 |
-
RUN if [ -f "Dockerfile" ]; then echo "Found Dockerfile in repo"; else echo "No Dockerfile found" && exit 1; fi
|
40 |
|
41 |
-
#
|
42 |
-
|
43 |
|
44 |
-
|
45 |
-
WORKDIR /usr/src/app
|
46 |
-
RUN chmod +x Dockerfile
|
47 |
-
|
48 |
-
# Build the repo's Docker image
|
49 |
-
RUN /usr/bin/docker build -t my-app .
|
50 |
|
51 |
-
# Expose the
|
52 |
EXPOSE 5000
|
53 |
|
54 |
-
#
|
55 |
-
CMD ["
|
56 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
FROM node:23.7.0 as builder
|
2 |
|
3 |
+
# Install git
|
4 |
RUN apt-get update && apt-get install -y git
|
5 |
|
6 |
+
# Clone the GitHub repository
|
7 |
RUN rm -rf /usr/src/app && git clone https://github.com/abubasith456/Node-WLA.git /usr/src/app
|
8 |
|
9 |
# Set the working directory
|
10 |
WORKDIR /usr/src/app
|
11 |
|
12 |
+
RUN ls
|
|
|
13 |
|
14 |
+
# Install npm dependencies
|
15 |
+
RUN npm install
|
16 |
|
17 |
+
RUN npm ci
|
|
|
|
|
|
|
|
|
|
|
18 |
|
19 |
+
# Expose the port your application runs on
|
20 |
EXPOSE 5000
|
21 |
|
22 |
+
# Start the application
|
23 |
+
CMD ["npm", "start"]
|
|