Spaces:
Running
Running
Update Dockerfile
Browse files- Dockerfile +7 -8
Dockerfile
CHANGED
|
@@ -4,17 +4,16 @@ FROM node:18-slim
|
|
| 4 |
# Install git to clone the repository
|
| 5 |
RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*
|
| 6 |
|
| 7 |
-
# Set the
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
ENV HOME=/home/user \
|
| 11 |
-
PATH=/home/user/.local/bin:$PATH
|
| 12 |
|
| 13 |
-
|
|
|
|
|
|
|
|
|
|
| 14 |
|
| 15 |
# The user requested to clone the repo inside the container
|
| 16 |
-
# We clone into a temporary directory and move contents to the app directory
|
| 17 |
-
# to avoid issues with non-empty directory or git metadata.
|
| 18 |
RUN git clone https://github.com/AlexaInc/wordlesolver.git .
|
| 19 |
|
| 20 |
# Install dependencies
|
|
|
|
| 4 |
# Install git to clone the repository
|
| 5 |
RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*
|
| 6 |
|
| 7 |
+
# Set the working directory and permissions
|
| 8 |
+
WORKDIR /home/node/app
|
| 9 |
+
RUN chown -R node:node /home/node/app
|
|
|
|
|
|
|
| 10 |
|
| 11 |
+
# Use the existing 'node' user (UID 1000)
|
| 12 |
+
USER node
|
| 13 |
+
ENV HOME=/home/node \
|
| 14 |
+
PATH=/home/node/.local/bin:$PATH
|
| 15 |
|
| 16 |
# The user requested to clone the repo inside the container
|
|
|
|
|
|
|
| 17 |
RUN git clone https://github.com/AlexaInc/wordlesolver.git .
|
| 18 |
|
| 19 |
# Install dependencies
|