Spaces:
Running
Running
bradduy
commited on
Commit
·
1059f41
1
Parent(s):
ebf51e8
update dockerfile
Browse files- Dockerfile +1 -9
Dockerfile
CHANGED
@@ -4,20 +4,12 @@ FROM node:20
|
|
4 |
# Set the working directory in the container
|
5 |
WORKDIR /app
|
6 |
|
7 |
-
RUN useradd -m -u 1000 user
|
8 |
-
USER user
|
9 |
-
ENV HOME=/home/user \
|
10 |
-
PATH=/home/user/.local/bin:$PATH
|
11 |
-
|
12 |
-
WORKDIR $HOME/app
|
13 |
-
|
14 |
-
COPY --chown=user . $HOME/app
|
15 |
-
|
16 |
# Copy the package.json and package-lock.json (or yarn.lock) to install dependencies
|
17 |
COPY package*.json ./
|
18 |
|
19 |
# Install dependencies
|
20 |
RUN yarn install
|
|
|
21 |
|
22 |
# Copy the rest of the application code into the container
|
23 |
COPY . .
|
|
|
4 |
# Set the working directory in the container
|
5 |
WORKDIR /app
|
6 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
# Copy the package.json and package-lock.json (or yarn.lock) to install dependencies
|
8 |
COPY package*.json ./
|
9 |
|
10 |
# Install dependencies
|
11 |
RUN yarn install
|
12 |
+
RUN mkdir -p node_modules/.cache && chmod -R 777 node_modules/.cache
|
13 |
|
14 |
# Copy the rest of the application code into the container
|
15 |
COPY . .
|