Spaces:
Sleeping
Sleeping
circulartext
commited on
Commit
•
e5132b5
1
Parent(s):
7e12b88
Update Dockerfile
Browse files- Dockerfile +17 -4
Dockerfile
CHANGED
@@ -1,7 +1,20 @@
|
|
1 |
FROM circulartextapp/readspaceout
|
2 |
|
3 |
-
# Set
|
4 |
-
|
|
|
5 |
|
6 |
-
# Set the
|
7 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
FROM circulartextapp/readspaceout
|
2 |
|
3 |
+
# Set up a new user named "myappuser" with user ID 1000
|
4 |
+
ARG USER_ID=1000
|
5 |
+
RUN addgroup --system myappgroup && adduser --system --group myappuser --uid ${USER_ID}
|
6 |
|
7 |
+
# Set the working directory to /app
|
8 |
+
WORKDIR /app
|
9 |
+
|
10 |
+
# Copy the current directory contents into the container at /app
|
11 |
+
COPY . .
|
12 |
+
|
13 |
+
# Set permissions for the app directory
|
14 |
+
RUN chown -R myappuser:myappgroup /app && chmod -R 777 /app
|
15 |
+
|
16 |
+
# Switch to the "myappuser" user
|
17 |
+
USER myappuser
|
18 |
+
|
19 |
+
# Example CMD (modify as needed)
|
20 |
+
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860", "--reload"]
|