Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +5 -1
Dockerfile
CHANGED
@@ -6,7 +6,7 @@ RUN apt-get update && \
|
|
6 |
apt-get install -y curl && \
|
7 |
apt-get clean && \
|
8 |
rm -rf /var/lib/apt/lists/* && \
|
9 |
-
useradd -m -u 1001 user
|
10 |
|
11 |
# Set environment variables
|
12 |
ENV HOME=/home/user \
|
@@ -14,10 +14,14 @@ ENV HOME=/home/user \
|
|
14 |
OLLAMA_HOST=0.0.0.0 \
|
15 |
OLLAMA_ORIGINS=*
|
16 |
|
|
|
|
|
|
|
17 |
# Set the working directory and switch to the user
|
18 |
WORKDIR $HOME/app
|
19 |
USER user
|
20 |
|
|
|
21 |
COPY --chown=user:user entrypoint.sh $HOME/app/
|
22 |
|
23 |
# Make the entrypoint script executable
|
|
|
6 |
apt-get install -y curl && \
|
7 |
apt-get clean && \
|
8 |
rm -rf /var/lib/apt/lists/* && \
|
9 |
+
useradd -m -u 1001 user
|
10 |
|
11 |
# Set environment variables
|
12 |
ENV HOME=/home/user \
|
|
|
14 |
OLLAMA_HOST=0.0.0.0 \
|
15 |
OLLAMA_ORIGINS=*
|
16 |
|
17 |
+
# ==> FIX: Explicitly grant ownership of the home directory to the user
|
18 |
+
RUN chown -R user:user $HOME
|
19 |
+
|
20 |
# Set the working directory and switch to the user
|
21 |
WORKDIR $HOME/app
|
22 |
USER user
|
23 |
|
24 |
+
# Copy the entrypoint script with the correct ownership
|
25 |
COPY --chown=user:user entrypoint.sh $HOME/app/
|
26 |
|
27 |
# Make the entrypoint script executable
|