Spaces:
Sleeping
Sleeping
Next7years
commited on
Commit
•
ed9f074
1
Parent(s):
4cf50e1
dfasdf
Browse files- .gitignore +2 -0
- Dockerfile +10 -1
.gitignore
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
1 |
+
env
|
2 |
+
test.py
|
Dockerfile
CHANGED
@@ -11,7 +11,16 @@ RUN --mount=type=secret,id=SECRET_EXAMPLE,mode=0444,required=true \
|
|
11 |
git init && \
|
12 |
git remote add origin $(cat /run/secrets/SECRET_EXAMPLE)
|
13 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
|
15 |
-
COPY . .
|
16 |
|
17 |
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7861"]
|
|
|
11 |
git init && \
|
12 |
git remote add origin $(cat /run/secrets/SECRET_EXAMPLE)
|
13 |
|
14 |
+
# Set up a new user named "user" with user ID 1000
|
15 |
+
RUN useradd -m -u 1000 user
|
16 |
+
# Switch to the "user" user
|
17 |
+
USER user
|
18 |
+
# Set home to the user's home directory
|
19 |
+
ENV HOME=/home/user \
|
20 |
+
PATH=/home/user/.local/bin:$PATH
|
21 |
+
|
22 |
+
# Set the working directory to the user's home directory
|
23 |
+
WORKDIR $HOME/app
|
24 |
|
|
|
25 |
|
26 |
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7861"]
|