Spaces:
Running
Running
Update Dockerfile
Browse files- Dockerfile +3 -27
Dockerfile
CHANGED
|
@@ -1,28 +1,4 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
# Copy local code to the container image.
|
| 5 |
-
WORKDIR /app
|
| 6 |
-
COPY . ./
|
| 7 |
-
|
| 8 |
-
# Install production dependencies.
|
| 9 |
-
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
| 10 |
-
|
| 11 |
-
# Set up a new user named "user" with user ID 1000
|
| 12 |
-
RUN useradd -m -u 1000 user
|
| 13 |
-
|
| 14 |
-
# Switch to the "user" user
|
| 15 |
-
USER user
|
| 16 |
-
|
| 17 |
-
# Set home to the user's home directory
|
| 18 |
-
ENV HOME=/home/user \
|
| 19 |
-
PATH=/home/user/.local/bin:$PATH
|
| 20 |
-
|
| 21 |
-
# Set the working directory to the user's home directory
|
| 22 |
-
WORKDIR $HOME/app
|
| 23 |
-
|
| 24 |
-
# Copy the current directory contents into the container at $HOME/app setting the owner to the user
|
| 25 |
-
COPY --chown=user . $HOME/app
|
| 26 |
-
|
| 27 |
-
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|
| 28 |
|
|
|
|
| 1 |
+
FROM nginx:alpine
|
| 2 |
+
COPY index.html /usr/share/nginx/html/
|
| 3 |
+
EXPOSE 80
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
|