taws 1.2.1

Terminal UI for AWS - navigate, observe, and manage AWS resources
# Stage 1: Build
FROM rust:latest AS builder

# Install build dependencies
RUN apt-get update && apt-get install -y \
    pkg-config \
    libssl-dev \
    && rm -rf /var/lib/apt/lists/*

WORKDIR /app

# Copy manifests first for better caching
COPY Cargo.toml Cargo.lock ./

# Create dummy src to build dependencies
RUN mkdir src && echo "fn main() {}" > src/main.rs

# Build dependencies only
RUN cargo build --release && rm -rf src

# Copy actual source code
COPY src ./src

# Build the actual binary
RUN touch src/main.rs && cargo build --release

# Stage 2: Runtime (same base as builder for glibc compatibility)
FROM debian:trixie-slim

# Install runtime dependencies for TLS
RUN apt-get update && apt-get install -y \
    ca-certificates \
    libssl3t64 \
    && rm -rf /var/lib/apt/lists/*

# Copy binary from builder
COPY --from=builder /app/target/release/taws /usr/local/bin/taws

# Set terminal for TUI
ENV TERM=xterm-256color

ENTRYPOINT ["taws"]