d221 commited on
Commit
1431761
·
verified ·
1 Parent(s): dc01d26

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -8
Dockerfile CHANGED
@@ -1,8 +1,7 @@
1
-
2
  # Use the official Qdrant image
3
  FROM qdrant/qdrant:v1.6.1
4
 
5
- # Switch to root user
6
  USER root
7
 
8
  # Install Nginx
@@ -11,9 +10,9 @@ RUN apt-get update && apt-get install -y nginx && rm -rf /var/lib/apt/lists/*
11
  # Ensure Qdrant is executable
12
  RUN chmod +x /qdrant
13
 
14
- # Fix permissions for Nginx directories
15
- RUN mkdir -p /var/lib/nginx/body /var/lib/nginx/proxy
16
- RUN chmod -R 777 /var/lib/nginx
17
 
18
  # Copy custom Nginx configuration
19
  COPY nginx.conf /etc/nginx/nginx.conf
@@ -21,6 +20,5 @@ COPY nginx.conf /etc/nginx/nginx.conf
21
  # Expose Hugging Face's required port
22
  EXPOSE 7860
23
 
24
- # Start both Qdrant and Nginx using a script
25
- CMD ["/bin/sh", "-c", "/qdrant & nginx -g 'daemon off;'"]
26
-
 
 
1
  # Use the official Qdrant image
2
  FROM qdrant/qdrant:v1.6.1
3
 
4
+ # Switch to root user to avoid permission issues
5
  USER root
6
 
7
  # Install Nginx
 
10
  # Ensure Qdrant is executable
11
  RUN chmod +x /qdrant
12
 
13
+ # permissions for Nginx directories and log files
14
+ RUN mkdir -p /var/lib/nginx/body /var/lib/nginx/proxy /var/log/nginx
15
+ RUN chmod -R 777 /var/lib/nginx /var/log/nginx
16
 
17
  # Copy custom Nginx configuration
18
  COPY nginx.conf /etc/nginx/nginx.conf
 
20
  # Expose Hugging Face's required port
21
  EXPOSE 7860
22
 
23
+ # Start Qdrant in the background and then start Nginx
24
+ CMD ["/bin/sh", "-c", "chmod +x /qdrant && /qdrant & nginx -g 'daemon off;'"]