-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.cli
More file actions
52 lines (38 loc) · 1.03 KB
/
Dockerfile.cli
File metadata and controls
52 lines (38 loc) · 1.03 KB
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# Dockerfile for Flowplane CLI
# Multi-stage build for optimized image size
# Build stage
FROM rust:1.89-slim as builder
# Install system dependencies for building
RUN apt-get update && apt-get install -y \
pkg-config \
libssl-dev \
libpq-dev \
curl \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
# Copy project files
COPY Cargo.toml Cargo.lock ./
COPY src ./src
# Build the CLI application
RUN cargo build --release --bin flowplane
# Runtime stage
FROM debian:trixie-slim
# Install runtime dependencies
RUN apt-get update && apt-get install -y \
ca-certificates \
libssl3 \
libpq5 \
&& rm -rf /var/lib/apt/lists/*
# Create app user
RUN useradd -r -s /bin/false -m -d /app flowplane
WORKDIR /app
# Copy the binary from builder stage
COPY --from=builder /app/target/release/flowplane /usr/local/bin/flowplane
# Change ownership
RUN chown -R flowplane:flowplane /app
# Switch to app user
USER flowplane
# Set environment variables
ENV RUST_LOG=info
# Default command shows help
CMD ["flowplane", "--help"]