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

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +8 -8
Dockerfile CHANGED
@@ -1,18 +1,18 @@
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
8
  RUN apt-get update && apt-get install -y nginx && rm -rf /var/lib/apt/lists/*
9
 
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,5 +20,5 @@ 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;'"]
 
1
  # Use the official Qdrant image
2
  FROM qdrant/qdrant:v1.6.1
3
 
4
+ # Switch to root user
5
  USER root
6
 
7
  # Install Nginx
8
  RUN apt-get update && apt-get install -y nginx && rm -rf /var/lib/apt/lists/*
9
 
10
+ # permissions for Nginx logs and directories
11
+ RUN mkdir -p /var/lib/nginx/body /var/lib/nginx/proxy /var/log/nginx /run
12
+ RUN chmod -R 777 /var/lib/nginx /var/log/nginx /run
13
 
14
+ # Ensure Nginx can write to the PID file
15
+ RUN touch /run/nginx.pid && chmod 777 /run/nginx.pid
 
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 and then Nginx
24
+ CMD ["/bin/sh", "-c", "/qdrant & nginx -g 'pid /dev/null; daemon off;'"]