Spaces:
Running
Running
Commit
·
9c72c01
1
Parent(s):
1ee423c
Update Dockerfile
Browse files- Dockerfile +3 -2
Dockerfile
CHANGED
@@ -33,7 +33,8 @@ RUN if [ -z "$USER_ID" ]; then \
|
|
33 |
RUN usermod -aG sudo appuser
|
34 |
|
35 |
# Set appropriate permissions for the application directory
|
36 |
-
RUN chown -R
|
|
|
37 |
|
38 |
# Install gosu (adjust the package manager based on your base image)
|
39 |
RUN apt-get update && apt-get install -y gosu && rm -rf /var/lib/apt/lists/*
|
@@ -43,7 +44,7 @@ COPY entrypoint.sh /usr/local/bin/entrypoint.sh
|
|
43 |
RUN chmod +x /usr/local/bin/entrypoint.sh
|
44 |
|
45 |
# Switch to the user for improved security
|
46 |
-
USER
|
47 |
|
48 |
# Define the entrypoint script to handle user creation and application startup
|
49 |
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
|
|
|
33 |
RUN usermod -aG sudo appuser
|
34 |
|
35 |
# Set appropriate permissions for the application directory
|
36 |
+
RUN chown -R appuser:appuser /app && chmod -R 755 /app
|
37 |
+
RUN chown -R appuser:appuser /tmp
|
38 |
|
39 |
# Install gosu (adjust the package manager based on your base image)
|
40 |
RUN apt-get update && apt-get install -y gosu && rm -rf /var/lib/apt/lists/*
|
|
|
44 |
RUN chmod +x /usr/local/bin/entrypoint.sh
|
45 |
|
46 |
# Switch to the user for improved security
|
47 |
+
USER appuser
|
48 |
|
49 |
# Define the entrypoint script to handle user creation and application startup
|
50 |
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
|