Spaces:
Sleeping
Sleeping
Commit
·
0a35a78
1
Parent(s):
d516448
Update Dockerfile
Browse files- Dockerfile +5 -1
Dockerfile
CHANGED
|
@@ -19,10 +19,14 @@ RUN if getent passwd user > /dev/null 2>&1 && getent group user > /dev/null 2>&1
|
|
| 19 |
# Install gosu (adjust the package manager based on your base image)
|
| 20 |
RUN apt-get update && apt-get install -y gosu && rm -rf /var/lib/apt/lists/*
|
| 21 |
|
| 22 |
-
#
|
|
|
|
| 23 |
COPY entrypoint.sh /usr/local/bin/entrypoint.sh
|
| 24 |
RUN chmod +x /usr/local/bin/entrypoint.sh
|
| 25 |
|
|
|
|
|
|
|
|
|
|
| 26 |
# Define the entrypoint script to handle user creation and application startup
|
| 27 |
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
|
| 28 |
|
|
|
|
| 19 |
# Install gosu (adjust the package manager based on your base image)
|
| 20 |
RUN apt-get update && apt-get install -y gosu && rm -rf /var/lib/apt/lists/*
|
| 21 |
|
| 22 |
+
# Install gosu (adjust the package manager based on your base image)
|
| 23 |
+
RUN apt-get update && apt-get install -y gosu && rm -rf /var/lib/apt/lists/*
|
| 24 |
COPY entrypoint.sh /usr/local/bin/entrypoint.sh
|
| 25 |
RUN chmod +x /usr/local/bin/entrypoint.sh
|
| 26 |
|
| 27 |
+
# Switch to the user for improved security
|
| 28 |
+
USER user
|
| 29 |
+
|
| 30 |
# Define the entrypoint script to handle user creation and application startup
|
| 31 |
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
|
| 32 |
|