content: # TraceGuard Development Environment
  # Ubuntu 24.04 + 6.6 kernel headers for eBPF development
  
  FROM ubuntu:24.04
  
  ENV DEBIAN_FRONTEND=noninteractive
  
  # Install base dependencies (separate layer for caching)
  RUN apt-get update && apt-get install -y \
      curl \
      wget \
      git \
      build-essential \
      pkg-config \
      libssl-dev \
      clang \
      llvm \
      bpftool \
      libbpf-dev \
      python3 \
      python3-pip \
      nodejs \
      npm \
      && rm -rf /var/lib/apt/lists/*
  
  # Install kernel headers in separate layer for better caching
  # This layer rarely changes and is expensive to rebuild (200MB+)
  RUN apt-get update && apt-get install -y \
      linux-headers-6.6.0-14-generic \
      linux-tools-6.6.0-14-generic \
      && rm -rf /var/lib/apt/lists/* \
      && cp -r /usr/src/linux-headers-* /tmp/kernel-headers/ || true
  
  # Install language toolchains (cached separately)
  # Install Rust
  RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
  ENV PATH="/root/.cargo/bin:${PATH}"
  
  # Install Rust targets and components
  RUN rustup target add x86_64-unknown-linux-gnu \
      && rustup target add aarch64-unknown-linux-gnu \
      && rustup component add rustfmt clippy
  
  # Install Go
  ENV GO_VERSION=1.22.3
  RUN wget https://go.dev/dl/go${GO_VERSION}.linux-amd64.tar.gz \
      && tar -C /usr/local -xzf go${GO_VERSION}.linux-amd64.tar.gz \
      && rm go${GO_VERSION}.linux-amd64.tar.gz
  ENV PATH="/usr/local/go/bin:${PATH}"
  
  # Install Node.js 20 LTS (separate layer)
  RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
      && apt-get install -y nodejs
  
  # Install development tools in final layer
  RUN cargo install cargo-watch \
      && npm install -g typescript ts-node
  
  # Create workspace
  WORKDIR /workspace
  
  # Set environment for eBPF development
  ENV KERNEL_VERSION=6.6.0-14-generic
  ENV KERNEL_HEADERS=/usr/src/linux-headers-${KERNEL_VERSION}
  
  # Entrypoint script
  COPY tools/docker/dev-entrypoint.sh /usr/local/bin/
  RUN chmod +x /usr/local/bin/dev-entrypoint.sh
  
  ENTRYPOINT ["/usr/local/bin/dev-entrypoint.sh"]
  CMD ["/bin/bash"]
  