Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +9 -17
Dockerfile
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
# Start from a stable Python base image
|
| 2 |
-
FROM python:3.13-bookworm
|
| 3 |
|
| 4 |
# Use ARG for versions to easily update them
|
| 5 |
ARG NEO4J_VERSION=5.15.0
|
|
@@ -57,28 +57,20 @@ RUN mv /app/temp_unzip/neo4j_data/* ${NEO4J_HOME}/data/ && \
|
|
| 57 |
mv /app/temp_unzip/neo4j_logs/* ${NEO4J_HOME}/logs/ && \
|
| 58 |
rm -rf /app/temp_unzip /app/neo4j_data.zip
|
| 59 |
|
| 60 |
-
# Create a non-root user
|
| 61 |
RUN useradd -m -u 1000 user
|
| 62 |
-
ENV HOME=/home/user
|
| 63 |
|
| 64 |
-
#
|
| 65 |
-
RUN
|
| 66 |
-
# Move the nginx.conf from the cloned repo to its destination
|
| 67 |
-
RUN mv /app/nginx.conf /etc/nginx/nginx.conf
|
| 68 |
-
|
| 69 |
-
# === Set Final Permissions ===
|
| 70 |
-
# This is the most critical step to prevent runtime errors.
|
| 71 |
-
# Change ownership of all application, database, and Nginx directories to the non-root user.
|
| 72 |
-
RUN chown -R user:user /app ${NEO4J_HOME} /var/lib/nginx /var/log/nginx /etc/nginx/nginx.conf
|
| 73 |
|
| 74 |
# Make the startup script executable
|
| 75 |
RUN chmod +x /app/scripts/run.sh
|
| 76 |
|
| 77 |
-
# Switch to the non-root user
|
| 78 |
USER user
|
| 79 |
|
| 80 |
-
# Expose the
|
| 81 |
-
EXPOSE
|
| 82 |
|
| 83 |
-
# Entrypoint to start
|
| 84 |
-
ENTRYPOINT ["/app/scripts/
|
|
|
|
| 1 |
# Start from a stable Python base image
|
| 2 |
+
FROM python:3.13-slim-bookworm
|
| 3 |
|
| 4 |
# Use ARG for versions to easily update them
|
| 5 |
ARG NEO4J_VERSION=5.15.0
|
|
|
|
| 57 |
mv /app/temp_unzip/neo4j_logs/* ${NEO4J_HOME}/logs/ && \
|
| 58 |
rm -rf /app/temp_unzip /app/neo4j_data.zip
|
| 59 |
|
| 60 |
+
# Create a non-root user
|
| 61 |
RUN useradd -m -u 1000 user
|
|
|
|
| 62 |
|
| 63 |
+
# Set Final Permissions for Neo4j and the app directory
|
| 64 |
+
RUN chown -R user:user /app ${NEO4J_HOME}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 65 |
|
| 66 |
# Make the startup script executable
|
| 67 |
RUN chmod +x /app/scripts/run.sh
|
| 68 |
|
| 69 |
+
# Switch to the non-root user
|
| 70 |
USER user
|
| 71 |
|
| 72 |
+
# Expose the Gradio port
|
| 73 |
+
EXPOSE 7860
|
| 74 |
|
| 75 |
+
# Entrypoint to start services
|
| 76 |
+
ENTRYPOINT ["/app/scripts/run_hf.sh"]
|