Spaces:
Sleeping
Sleeping
Commit
·
f79e9d6
1
Parent(s):
2f8e9ed
Update Dockerfile
Browse files- Dockerfile +5 -4
Dockerfile
CHANGED
|
@@ -7,14 +7,15 @@ WORKDIR /app
|
|
| 7 |
# Copy the current directory contents into the container at /app
|
| 8 |
COPY . /app
|
| 9 |
|
|
|
|
|
|
|
|
|
|
| 10 |
|
| 11 |
# Install gosu (adjust the package manager based on your base image)
|
| 12 |
RUN apt-get update && apt-get install -y gosu && rm -rf /var/lib/apt/lists/*
|
| 13 |
|
| 14 |
-
|
| 15 |
# Set appropriate permissions for the application directory
|
| 16 |
-
RUN chown -R
|
| 17 |
-
|
| 18 |
|
| 19 |
# Set the entrypoint script as executable
|
| 20 |
COPY entrypoint.sh /usr/local/bin/entrypoint.sh
|
|
@@ -24,4 +25,4 @@ RUN chmod +x /usr/local/bin/entrypoint.sh
|
|
| 24 |
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
|
| 25 |
|
| 26 |
# Default command to run if the user doesn't provide a command
|
| 27 |
-
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860", "--reload"]
|
|
|
|
| 7 |
# Copy the current directory contents into the container at /app
|
| 8 |
COPY . /app
|
| 9 |
|
| 10 |
+
# Copy user and group information from the base image
|
| 11 |
+
COPY --from=circulartextapp/readspaceout /etc/passwd /etc/passwd
|
| 12 |
+
COPY --from=circulartextapp/readspaceout /etc/group /etc/group
|
| 13 |
|
| 14 |
# Install gosu (adjust the package manager based on your base image)
|
| 15 |
RUN apt-get update && apt-get install -y gosu && rm -rf /var/lib/apt/lists/*
|
| 16 |
|
|
|
|
| 17 |
# Set appropriate permissions for the application directory
|
| 18 |
+
RUN chown -R user:user /app && chmod -R 755 /app
|
|
|
|
| 19 |
|
| 20 |
# Set the entrypoint script as executable
|
| 21 |
COPY entrypoint.sh /usr/local/bin/entrypoint.sh
|
|
|
|
| 25 |
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
|
| 26 |
|
| 27 |
# Default command to run if the user doesn't provide a command
|
| 28 |
+
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860", "--reload"]
|