Spaces:
Sleeping
Sleeping
circulartext
commited on
Commit
•
38a6645
1
Parent(s):
9c780e0
Update Dockerfile
Browse files- Dockerfile +4 -10
Dockerfile
CHANGED
@@ -1,6 +1,10 @@
|
|
1 |
# Use a suitable base Docker image with necessary dependencies
|
2 |
FROM circulartextapp/spaceread
|
3 |
|
|
|
|
|
|
|
|
|
4 |
# Set the working directory to /app
|
5 |
WORKDIR /app
|
6 |
|
@@ -11,16 +15,6 @@ COPY . /app
|
|
11 |
ARG USER_ID=1000
|
12 |
ENV USER_ID=$USER_ID
|
13 |
|
14 |
-
# Check if the user already exists
|
15 |
-
RUN if [ -z "$USER_ID" ]; then \
|
16 |
-
echo "User ID not provided. Using the default user ID 1000."; \
|
17 |
-
USER_ID=1000; \
|
18 |
-
fi && \
|
19 |
-
if id "$USER_ID" >/dev/null 2>&1; then \
|
20 |
-
echo "User with ID $USER_ID already exists."; \
|
21 |
-
else \
|
22 |
-
useradd -m -u "$USER_ID" user; \
|
23 |
-
fi
|
24 |
|
25 |
# Set appropriate permissions for the application directory
|
26 |
RUN chown -R user:user /app && chmod -R 755 /app
|
|
|
1 |
# Use a suitable base Docker image with necessary dependencies
|
2 |
FROM circulartextapp/spaceread
|
3 |
|
4 |
+
RUN adduser --uid 1000 --disabled-password --gecos '' appuser
|
5 |
+
USER 1000
|
6 |
+
|
7 |
+
|
8 |
# Set the working directory to /app
|
9 |
WORKDIR /app
|
10 |
|
|
|
15 |
ARG USER_ID=1000
|
16 |
ENV USER_ID=$USER_ID
|
17 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
|
19 |
# Set appropriate permissions for the application directory
|
20 |
RUN chown -R user:user /app && chmod -R 755 /app
|