-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
34 lines (24 loc) · 888 Bytes
/
Dockerfile
File metadata and controls
34 lines (24 loc) · 888 Bytes
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
# Multi-stage build for all Poda services
FROM rust:latest as builder
WORKDIR /app
# Copy the entire workspace
COPY . .
# Build all binaries in one stage
RUN cargo build --release --bin dispencer && \
cargo build --release --bin storage-provider && \
cargo build --release --bin challenger
# Single runtime stage with all binaries
FROM rust:latest as runtime
WORKDIR /app
# Copy all binaries from builder
COPY --from=builder /app/target/release/dispencer /app/dispencer
COPY --from=builder /app/target/release/storage-provider /app/storage-provider
COPY --from=builder /app/target/release/challenger /app/challenger
# Create data directory for storage providers
RUN mkdir -p /data
# Create a non-root user
RUN useradd -r -s /bin/false app && chown -R app:app /app /data
USER app
EXPOSE 3000
# Default command (can be overridden in docker-compose)
CMD ["/app/dispencer"]