Spaces:
Running
Running
Commit
·
19ebf44
1
Parent(s):
79fcd0a
update: config
Browse files- Dockerfile +5 -6
Dockerfile
CHANGED
@@ -1,21 +1,20 @@
|
|
1 |
# Use the official Node.js v18 image as the base image
|
2 |
FROM node:18
|
3 |
|
4 |
-
USER user
|
5 |
-
|
6 |
-
RUN useradd -m -u 1000 user
|
7 |
-
|
8 |
# Set the working directory inside the container
|
9 |
WORKDIR /app
|
10 |
|
11 |
# Copy package.json and package-lock.json to the working directory
|
12 |
-
COPY
|
13 |
|
14 |
# Install dependencies
|
15 |
RUN npm install
|
16 |
|
17 |
# Copy the entire application code to the working directory
|
18 |
-
COPY
|
|
|
|
|
|
|
19 |
|
20 |
# Build the TypeScript code
|
21 |
#RUN npm run build
|
|
|
1 |
# Use the official Node.js v18 image as the base image
|
2 |
FROM node:18
|
3 |
|
|
|
|
|
|
|
|
|
4 |
# Set the working directory inside the container
|
5 |
WORKDIR /app
|
6 |
|
7 |
# Copy package.json and package-lock.json to the working directory
|
8 |
+
COPY package*.json ./
|
9 |
|
10 |
# Install dependencies
|
11 |
RUN npm install
|
12 |
|
13 |
# Copy the entire application code to the working directory
|
14 |
+
COPY . .
|
15 |
+
|
16 |
+
# remove .env file if it exists
|
17 |
+
RUN rm -f -- .env
|
18 |
|
19 |
# Build the TypeScript code
|
20 |
#RUN npm run build
|