File size: 1,048 Bytes
3d83ed9
 
 
fecd3b0
 
3d83ed9
fecd3b0
 
 
 
 
 
 
1aed394
 
3d83ed9
 
 
2e96828
 
fecd3b0
2e96828
fecd3b0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
29
30
31
32
33
34
35
36
37
38
FROM rustfs/rustfs:1.0.0-alpha.72 AS rustfs_base

# Now build our custom image with nginx
FROM debian:bookworm-slim

# Install nginx and other dependencies
RUN apt-get update && apt-get install -y \
    curl \
    ca-certificates \
    nginx \
    procps \
    && rm -rf /var/lib/apt/lists/*

# Copy RustFS binary from official image (correct location is /usr/bin/rustfs)
COPY --from=rustfs_base /usr/bin/rustfs /usr/local/bin/rustfs

# Install MinIO Client (mc) for bucket management
RUN curl -o /usr/local/bin/mc https://dl.min.io/client/mc/release/linux-amd64/mc && \
    chmod +x /usr/local/bin/mc && \
    chmod +x /usr/local/bin/rustfs

# Create directories with proper permissions
RUN mkdir -p /data /var/log/rustfs && chmod 777 /data

# Copy configuration files
COPY nginx.conf /etc/nginx/nginx.conf
COPY entrypoint.sh /usr/local/bin/entrypoint.sh
COPY README.md /app/README.md

# Set permissions
RUN chmod +x /usr/local/bin/entrypoint.sh

WORKDIR /app

# Expose port for HuggingFace Spaces
EXPOSE 7860

CMD ["/usr/local/bin/entrypoint.sh"]