Spaces:
Paused
Paused
fix user
Browse files- Dockerfile +5 -6
Dockerfile
CHANGED
|
@@ -24,12 +24,6 @@ RUN groupadd --system appuser
|
|
| 24 |
# -g appuser: Set the primary group for the user
|
| 25 |
RUN useradd --system -m -s /bin/bash -g appuser appuser
|
| 26 |
|
| 27 |
-
# Switch to the new user
|
| 28 |
-
USER appuser
|
| 29 |
-
|
| 30 |
-
# Set environment variables for the user (optional)
|
| 31 |
-
ENV HOME=/home/appuser
|
| 32 |
-
|
| 33 |
|
| 34 |
# Install nvm (Node Version Manager) and then use it to install Node.js and npm
|
| 35 |
# This ensures a clean and controlled Node.js/npm environment
|
|
@@ -84,5 +78,10 @@ EXPOSE 7860
|
|
| 84 |
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s \
|
| 85 |
CMD curl -f http://localhost:7860/ || exit 1
|
| 86 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 87 |
# Start with sync
|
| 88 |
ENTRYPOINT ["/start.sh"]
|
|
|
|
| 24 |
# -g appuser: Set the primary group for the user
|
| 25 |
RUN useradd --system -m -s /bin/bash -g appuser appuser
|
| 26 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 27 |
|
| 28 |
# Install nvm (Node Version Manager) and then use it to install Node.js and npm
|
| 29 |
# This ensures a clean and controlled Node.js/npm environment
|
|
|
|
| 78 |
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s \
|
| 79 |
CMD curl -f http://localhost:7860/ || exit 1
|
| 80 |
|
| 81 |
+
# Switch to the new user
|
| 82 |
+
USER appuser
|
| 83 |
+
|
| 84 |
+
# Set environment variables for the user (optional)
|
| 85 |
+
ENV HOME=/home/appuser
|
| 86 |
# Start with sync
|
| 87 |
ENTRYPOINT ["/start.sh"]
|