File size: 935 Bytes
9b090ae
 
8d1a216
9b090ae
 
 
8d1a216
9b090ae
 
 
 
8d1a216
9b090ae
 
 
 
 
2a64b8f
9b090ae
 
a90782d
9b090ae
 
 
8d1a216
9b090ae
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# Start from the Milvus base image
FROM milvusdb/milvus:v2.4.15

# Create required directories and set permissions
RUN mkdir -p /var/lib/milvus /milvus/configs && \
    chmod -R 777 /var/lib/milvus /milvus/configs

# Copy necessary configuration files
# Assumes embedEtcd.yaml and user.yaml are in the build context
COPY embedEtcd.yaml /milvus/configs/embedEtcd.yaml
COPY user.yaml /milvus/configs/user.yaml

# Environment variables required for Milvus standalone setup
ENV ETCD_USE_EMBED=true
ENV ETCD_DATA_DIR=/var/lib/milvus/etcd
ENV ETCD_CONFIG_PATH=/milvus/configs/embedEtcd.yaml
ENV COMMON_STORAGETYPE=local

# Expose necessary ports for Milvus
EXPOSE 19530 9091 2379

# Health check command to monitor Milvus status
HEALTHCHECK --interval=30s --timeout=20s --start-period=90s --retries=3 \
    CMD curl -f http://localhost:9091/healthz || exit 1

# Command to start Milvus in standalone mode
CMD ["milvus", "run", "standalone"]