diff --git a/Dockerfile b/Dockerfile index cb8c0bcc..dfce24ef 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ # Use the official Python 3.12 slim image as the base image FROM python:3.12-slim AS builder ENV LANG=C.UTF-8 -ENV PYTHONDONTWRITEBYTECODE=1 +ENV PYTHONDONTWRYTEBYTECODE=1 ENV PYTHONUNBUFFERED=1 ENV PATH="/app/venv/bin:$PATH" @@ -24,5 +24,12 @@ COPY ./krr.py krr.py COPY ./robusta_krr/ robusta_krr/ COPY ./intro.txt intro.txt +# Create a non-root user for security +RUN adduser --disabled-password --gecos "" --uid 1000 krr && \ + chown -R krr:krr /app + +# Switch to non-root user +USER 1000 + # Run the application using 'poetry run krr simple' CMD ["python", "krr.py", "simple"] diff --git a/README.md b/README.md index d54dabeb..21125e29 100644 --- a/README.md +++ b/README.md @@ -103,6 +103,51 @@ By right-sizing your containers with KRR, you can save an average of 69% on clou Read more about [how KRR works](#how-krr-works) + + +## Quick Start Guide + +Get up and running with KRR in under 5 minutes: + +### 1. Install KRR + +```bash +pip install robusta-krr +``` + +### 2. Verify Installation + +```bash +krr --help +``` + +### 3. Run Your First Scan + +```bash +krr simple --prometheus-url=http://localhost:9090 +``` + +That's it! You now have recommendations for optimizing your Kubernetes resources. + +For more details, see the full [Installation](#installation) and [Usage](#usage) sections below. + + +## Quick Start Guide + +Get started with KRR in under 5 minutes: + +```bash +# Install with Homebrew +brew tap robusta-dev/homebrew-krr +brew install krr + +# Verify installation +krr version + +# Run your first scan +krr simple +``` + ## Difference with Kubernetes VPA | Feature 🛠️ | Robusta KRR 🚀 | Kubernetes VPA 🌐 |