triflix commited on
Commit
a081114
·
verified ·
1 Parent(s): 83a3452

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +11 -19
Dockerfile CHANGED
@@ -1,23 +1,15 @@
1
- # Use the official Qdrant Docker image as the base
2
  FROM qdrant/qdrant:latest
3
 
4
- # Set the working directory (optional, for structure)
5
- WORKDIR /workspace
6
 
7
- # (Optional) You may want to copy your custom config or scripts here
8
- # COPY production.yaml /workspace/production.yaml
9
- # Or add other dependencies if your app requires
 
 
 
10
 
11
- # Hugging Face Spaces require data to be written in /tmp
12
- # Mount /tmp as the Qdrant storage directory
13
- ENV QDRANT__STORAGE__STORAGE_PATH=/tmp/qdrant_storage
14
-
15
- # Expose Qdrant ports used for REST and gRPC
16
- EXPOSE 6333
17
- EXPOSE 6334
18
-
19
- # (Optional) Default healthcheck
20
- HEALTHCHECK CMD curl --fail http://localhost:6333 || exit 1
21
-
22
- # Entrypoint: Start Qdrant
23
- CMD ["qdrant"]
 
1
+ # 1. Use the official Qdrant image as the base
2
  FROM qdrant/qdrant:latest
3
 
4
+ # 2. Switch to root user for build-time permissions
5
+ USER root
6
 
7
+ # 3. Key changes:
8
+ # - Create /qdrant/storage and /qdrant/snapshots directories
9
+ # - Recursively set ownership of /qdrant to UID 1000 (qdrant user)
10
+ # - Ensures qdrant user can read/write all current and future subdirectories
11
+ RUN mkdir -p /qdrant/storage /qdrant/snapshots && \
12
+ chown -R 1000:1000 /qdrant
13
 
14
+ # 4. Switch back to non-root qdrant user for runtime
15
+ USER 1000