Spaces:
Sleeping
Sleeping
Commit ·
e410ca7
1
Parent(s): e10d2fa
Update Dockerfile
Browse files- Dockerfile +3 -6
Dockerfile
CHANGED
|
@@ -19,7 +19,7 @@ RUN if id "$USER_ID" >/dev/null 2>&1; then \
|
|
| 19 |
fi
|
| 20 |
|
| 21 |
# Set appropriate permissions for the application directory
|
| 22 |
-
RUN chown -R user:user /app
|
| 23 |
|
| 24 |
# Switch to the user for improved security
|
| 25 |
USER user
|
|
@@ -27,9 +27,6 @@ USER user
|
|
| 27 |
# Copy gosu from the packages image (assumed that gosu is already available in spaceread image)
|
| 28 |
COPY --from=base /usr/sbin/gosu /usr/sbin/gosu
|
| 29 |
|
| 30 |
-
#
|
| 31 |
COPY entrypoint.sh /usr/local/bin/entrypoint.sh
|
| 32 |
-
|
| 33 |
-
# Default command to run if the user doesn't provide a command
|
| 34 |
-
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860", "--reload"]
|
| 35 |
-
|
|
|
|
| 19 |
fi
|
| 20 |
|
| 21 |
# Set appropriate permissions for the application directory
|
| 22 |
+
RUN chown -R user:user /app
|
| 23 |
|
| 24 |
# Switch to the user for improved security
|
| 25 |
USER user
|
|
|
|
| 27 |
# Copy gosu from the packages image (assumed that gosu is already available in spaceread image)
|
| 28 |
COPY --from=base /usr/sbin/gosu /usr/sbin/gosu
|
| 29 |
|
| 30 |
+
# Copy entrypoint.sh separately
|
| 31 |
COPY entrypoint.sh /usr/local/bin/entrypoint.sh
|
| 32 |
+
RUN chmod +x /usr/local/bin/entrypoint.sh
|
|
|
|
|
|
|
|
|